Javascript: Table.columns Property
Description
Gets a collection of all columns the table consists of.
Syntax
<TableColumnCollection> Table.columnsExamples
The following example demonstrates Table.columns in a practical document-editing workflow. It gets a collection of all columns the table consists of.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(mainText) {
const tables = mainText.tables;
tables.getItem(function(table) {
if (!table) {
console.warn("No table is available at the current input position.");
return;
}
table.columns.getCount(function(count) {
console.log("columns count:", count);
}, onTxError);
}, onTxError);
}, onTxError);Limitations
Read Only.