Represents a column in a [[WorksheetTable]].

WorksheetTableColumn

new WorksheetTableColumn(a: WorksheetTable, b: number, c: number): WorksheetTableColumn

Returns WorksheetTableColumn

$t: Type
filter: Filter
name: string
sortCondition: SortCondition
totalFormula: Formula
totalLabel: string

Gets the formula associated with the data area of the column.

get columnFormula(): Formula

Returns Formula

Gets the [[WorksheetRegion]] which represents the region of cells in the data area of the column.

get dataAreaRegion(): WorksheetRegion

Returns WorksheetRegion

Gets the [[WorksheetCell]] which represents the header cell for the column. A WorksheetCell which represents the header cell for the column or null if the header row is not visible in the table.

get headerCell(): WorksheetCell

Returns WorksheetCell

Gets the 0-based index of the column in the owning [[WorksheetTable.columns]] collection. The 0-based index of the column in its collection or -1 if the column has been removed from the table.

get index(): number

Returns number

Gets the [[WorksheetTable]] to which the column belongs. The WorksheetTable to which the column belongs or null if the column has been removed from the table.

get table(): WorksheetTable

Returns WorksheetTable

Gets the [[WorksheetCell]] which represents the total cell for the column. A WorksheetCell which represents the total cell for the column or null if the totals row is not visible in the table.

get totalCell(): WorksheetCell

Returns WorksheetCell

Gets the [[WorksheetRegion]] which represents the region of cells in the whole column, including the header and total cells, if visible.

get wholeColumnRegion(): WorksheetRegion

Returns WorksheetRegion

Applies an [[AverageFilter]] to the column.

applyAverageFilter(type: AverageFilterType): AverageFilter

Parameters

  • type: AverageFilterType

    The value indicating whether to filter in values below or above the average of the data range.

Returns AverageFilter

Applies a [[CustomFilter]] to the column.

applyCustomFilter(condition: CustomFilterCondition): CustomFilter

Parameters

Returns CustomFilter

Applies an [[DatePeriodFilter]] to the column.

applyDatePeriodFilter(type: DatePeriodFilterType, value: number): DatePeriodFilter

Parameters

  • type: DatePeriodFilterType

    The type of date period to filter in.

  • value: number

    The 1-based value of the month or quarter to filter in.

Returns DatePeriodFilter

Applies a [[FillFilter]] to the column.

applyFillFilter(fill: CellFill): FillFilter

Parameters

  • fill: CellFill

    A [[CellFill]] by which the cells should be filtered.

Returns FillFilter

Applies a [[FixedValuesFilter]] to the column.

applyFixedValuesFilter(includeBlanks: boolean, calendarType: CalendarType, dateGroups: FixedDateGroup[]): FixedValuesFilter

Parameters

  • includeBlanks: boolean

    The value which indicates whether blank cells should be filtered in.

  • calendarType: CalendarType

    The calendar type used to interpret values in the 'dateGroups' collection.

  • dateGroups: FixedDateGroup[]

    The collection of fixed date groups which should be filtered in.

Returns FixedValuesFilter

Applies a [[FontColorFilter]] to the column.

applyFontColorFilter(fontColorInfo: WorkbookColorInfo): FontColorFilter

Parameters

  • fontColorInfo: WorkbookColorInfo

    A [[WorkbookColorInfo]] which describes the font color by which the cells should be filtered.

Returns FontColorFilter

Applies a [[IconFilter]] to the column.

applyIconFilter(iconSet: FormatConditionIconSet, iconIndex: number): IconFilter

Parameters

  • iconSet: FormatConditionIconSet

    The icon set containing the icon.

  • iconIndex: number

    The zero-based index of the icon in the set or null for 'NoCellIcon'.

Returns IconFilter

Applies a [[RelativeDateRangeFilter]] to the column.

applyRelativeDateRangeFilter(offset: RelativeDateRangeOffset, duration: RelativeDateRangeDuration): RelativeDateRangeFilter

Parameters

Returns RelativeDateRangeFilter

Applies a [[TopOrBottomFilter]] to the column which will filter in the top 10 values in the list of sorted values.

applyTopOrBottomFilter(): TopOrBottomFilter

Returns TopOrBottomFilter

Applies a [[YearToDateFilter]] to the column.

applyYearToDateFilter(): YearToDateFilter

Returns YearToDateFilter

Gets the format for the specified area. An [[IWorksheetCellFormat]] instance describing the appearance of the specified area.

areaFormats(area: WorksheetTableColumnArea): IWorksheetCellFormat

Parameters

Returns IWorksheetCellFormat

Removes the filter from the column if one is applied.

clearFilter(): void

Returns void

Sets the formula to use in the data cells in the column.

setColumnFormula(formula: Formula, overwriteExistingValues: boolean): void

Parameters

  • formula: Formula

    The formula for the data cells of the column or null to remove the current column formula.

  • overwriteExistingValues: boolean

    True to overwrite the existing cells values and apply the formula to all data cells in the column. False to only apply the formula to the cells with no value set.

Returns void