答案 0 :(得分: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
}
}
});