[]
        
(Showing Draft Content)

Table Class

Table Class

Represents a Table within the FlexSheet control.

Heirarchy

  • Table

Constructors

constructor

  • Initializes a new instance of the Table class.

    Parameters

    • name: string

      The name of the table.

    • range: CellRange

      The range of the table.

    • Optional style: TableStyle

      The table style to use with the table. The default style is the 'TableStyleMedium9' built-in table style, if the style is omitted.

    • Optional columns: TableColumn[]

      The columns of the table.

    • Optional options: ITableOptions

      The options ITableOptions of the table.

    Returns Table

Properties

alterFirstColumn

alterFirstColumn: boolean

Gets or sets a value that determines whether the first table column should have the style applied.

alterLastColumn

alterLastColumn: boolean

Gets or sets a value that determines whether the last table column should have the style applied.

name

name: string

Gets or sets the table name.

The table name is used to reference the table programmatically.

sheet

sheet: Sheet

Gets the Sheet this table belongs to.

showBandedColumns

showBandedColumns: boolean

Indicating whether banded column formatting is applied.

showBandedRows

showBandedRows: boolean

Gets or sets a value that determines whether banded row formatting is applied.

showHeaderRow

showHeaderRow: boolean

Indicates whether the table should include a header row.

showTotalRow

showTotalRow: boolean

Indicates whether the table should include a total row.

style

style: TableStyle

Gets or sets the TableStyle associated with this table.

Methods

deleteRows

  • deleteRows(index: number, count?: number, shift?: boolean): void
  • Delete rows of Table.

    Parameters

    • index: number

      The starting index of the deleting rows in Table.

    • Optional count: number

      The numbers of rows to delete. If not specified then one row will be deleted.

    • Optional shift: boolean

      Indicates whether cells beneath the table should be shifted or not. If not specified cells beneath will be shifted.

    Returns void

getColumns

getRange

  • Gets the range of the specific section and column on the relevant sheet that the table occupies.

    Parameters

    • Optional section: TableSection

      The section of Table. If the section is omitted. It will get the range of entire table.

    • Optional column: any

      The column of Table. The column could be TableColumn instance, column name or column index. If the column is omitted. It will get the range for all columns in the table. If the section is null, the reference of the specific column includes the header row and the totals row if they are visible.

    Returns CellRange

    the range of the specific table section and specific column, if the specific column doesn't exist in table it will return null.

insertRows

  • insertRows(index: number, count?: number, shift?: boolean): boolean
  • Insert rows into Table.

    Parameters

    • index: number

      The position where new rows should be added in table.

    • Optional count: number

      The numbers of rows to add. If not specified then one row will be added.

    • Optional shift: boolean

      Indicates whether cells beneath the table should be shifted or not. If not specified cells beneath will be shifted.

    Returns boolean

    True if the rows are inserted successfully.