添加到文档或工作表中后,是否可以遍历表行和列。
我正在使用以下代码添加一个表,并且我希望此代码成功我应该能够访问行和列应该能够在一些转换后替换单元格的值。Bellow 是我用来创建表格的代码。
var tableData = new Office.TableData();
var headers = [placeholder.columns.map(function (c) { return c.column; })];
tableData.headers = headers
tableData.rows = rows;
var document = Office.context.document;
document.setSelectedDataAsync(tableData, function (result) {
var placeholder = Office.context.document.settings.get(results.binding.id);
if (officeCallSucceded(result, true)) {
document.bindings.addFromSelectionAsync(Office.BindingType.Table, function (result) {
if (officeCallSucceded(result)) {
//SOME LOGIC FOR BINDING HERE TO ADD //EVENT handlers to the table just added
}
});
}
}
);
}