TableColumnDefinition Interface
Named table column with optional calculated-column and totals formulas.
Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.
Type-only declaration; it is not a JavaScript runtime constructor.
Members
Properties
| Property | Description |
|---|---|
| formula | The formula value of TableColumnDefinition. |
| id | The id value of TableColumnDefinition. |
| name | The name value of TableColumnDefinition. |
| totalsFormula | The totalsFormula value of TableColumnDefinition. |
| totalsFunction | The totalsFunction value of TableColumnDefinition. |
| totalsLabel | The totalsLabel value of TableColumnDefinition. |
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 createTableColumnDefinitionReport(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;
}