Is it possible to iterate through the rows and columns of a table after adding to a document or worksheet.
I use the following code to add a table, and I want that, when this code runs successfully, I must have access to the rows, and the column should be able to replace the cell values ββafter some conversion. Below is the code that I use to create the table.
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)) {
}
});
}
}
);
}
source
share