簡體   English   中英

如何從辦公室內容添加打開選擇數據對話(內容應用程序)

[英]How to open Select Data Dialogue from office content add in (Content App)

如何從辦公室內容中添加“打開選擇數據對話”。同時打開的對話框

  1. 插入Excel圖表。
  2. 右鍵單擊聊天。
  3. 選擇數據。
    在此輸入圖像描述

最后我找到了答案
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

                }
            }
        });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM