1

如何从 Office 内容添加中打开选择数据对话框。打开时打开的相同对话框

  1. 插入excel图表。
  2. 右键聊天。
  3. 选择数据。
    在此处输入图像描述
4

1 回答 1

0

最后我找到了答案
Office.context.document.bindings.addFromPromptAsync做的伎俩

Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Table,
        {
            id: "you id",
            promptText: "your text"
        },
        function (asyncResult) {
            if (asyncResult.status == Office.AsyncResultStatus.Succeeded) {
                if (asyncResult.value.columnCount < 2 || asyncResult.value.rowCount < 1) {
                    Office.context.document.bindings.releaseByIdAsync("DetailData");
                    myMessageBox.showErrorMessage("Insufficient detail data.");
                }
                else {
                    _detailDataBinding = asyncResult.value;
                    //do your work

                }
            }
        });
于 2016-12-06T07:44:57.230 回答