TableColumnDefinition.totalsFormula Property
The totalsFormula value of TableColumnDefinition.
Owner: TableColumnDefinition. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.
Syntax
totalsFormula?: string | undefined
Read through the owning object: owner.totalsFormula. Follow the declared mutability and owning object lifetime.
Examples
Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.
import type { Workbook } from '@txtextcontrol/tx-sheet-control';
function createTableColumnDefinitionTotalsFormula(book: Workbook) {
const sheet = book.sheets.at(0);
sheet.range('A7:D9').setValues([
['Description', 'Quantity', 'UnitPrice', 'Amount'],
['Consulting', 3, 120, 360],
['Training', 2, 90, 180],
]);
const table = sheet.tables.add('InvoiceLines', 'A7:D9', {
style: 'TableStyleMedium2',
hasHeaderRow: true,
showRowStripes: true,
});
const result = table.snapshot.columns[3];
return result.totalsFormula;
}
Remarks
Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.