Office.BindingType enum
指定应返回的绑定对象的类型。
注解
使用方
- Office.Binding: 类型
- Office.Bindings: addFromNamedItemAsync、 addFromPromptAsync、 addFromSelectionAsync
示例
// Create a new table binding for the selected table.
Office.context.document.bindings.addFromSelectionAsync(Office.BindingType.Table, { id: "MyTableBinding" }, function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
showMessage("Action failed with error: " + asyncResult.error.message);
} else {
showMessage("Added new binding with type: " + asyncResult.value.type + " and ID: " + asyncResult.value.id);
}
});
字段
| Matrix | 不带标题行的表格数据。 数据作为数组数组返回,例如采用以下格式:[[row1column1, row1column2],[row2column1, row2column2]] |
| Table | 带有标题行的表格数据。 数据作为 TableData 对象返回。 |
| Text | 纯文本。 数据作为连续文本的字符返回。 |