Edit

Share via


Excel.Interfaces.TableData interface

An interface describing the data returned by calling table.toJSON().

Properties

altTextDescription

Specifies the alternative text for accessibility.

altTextTitle

Specifies a summary for the table, such as one used by screen readers.

autoFilter

Represents the AutoFilter object of the table.

columns

Represents a collection of all the columns in the table.

comment

Specifies a comment associated with the table.

highlightFirstColumn

Specifies if the first column contains special formatting.

highlightLastColumn

Specifies if the last column contains special formatting.

id

Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed.

isActive

Retrieves whether the table is currently active.

legacyId

Returns a numeric ID.

name

Name of the table.

The set name of the table must follow the guidelines specified in the Rename an Excel table article.

rows

Represents a collection of all the rows in the table.

showBandedColumns

Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier.

showBandedRows

Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier.

showFilterButton

Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row.

showHeaders

Specifies if the header row is visible. This value can be set to show or remove the header row.

showTotals

Specifies if the total row is visible. This value can be set to show or remove the total row.

sort

Represents the sorting for the table.

source

Retrieves the data source type from which the table originates.

style

Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified.

tableStyle

The style applied to the table.

Property Details

altTextDescription

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the alternative text for accessibility.

altTextDescription?: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

altTextTitle

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies a summary for the table, such as one used by screen readers.

altTextTitle?: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

autoFilter

Represents the AutoFilter object of the table.

autoFilter?: Excel.Interfaces.AutoFilterData;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

columns

Represents a collection of all the columns in the table.

columns?: Excel.Interfaces.TableColumnData[];

Property Value

Remarks

[ API set: ExcelApi 1.1 ]

comment

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies a comment associated with the table.

comment?: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

highlightFirstColumn

Specifies if the first column contains special formatting.

highlightFirstColumn?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.3 ]

highlightLastColumn

Specifies if the last column contains special formatting.

highlightLastColumn?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.3 ]

id

Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed.

id?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.1 ]

isActive

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Retrieves whether the table is currently active.

isActive?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

legacyId

Returns a numeric ID.

legacyId?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.8 ]

name

Name of the table.

The set name of the table must follow the guidelines specified in the Rename an Excel table article.

name?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.1 ]

rows

Represents a collection of all the rows in the table.

rows?: Excel.Interfaces.TableRowData[];

Property Value

Remarks

[ API set: ExcelApi 1.1 ]

showBandedColumns

Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier.

showBandedColumns?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.3 ]

showBandedRows

Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier.

showBandedRows?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.3 ]

showFilterButton

Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row.

showFilterButton?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.3 ]

showHeaders

Specifies if the header row is visible. This value can be set to show or remove the header row.

showHeaders?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.1 ]

showTotals

Specifies if the total row is visible. This value can be set to show or remove the total row.

showTotals?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.1 ]

sort

Represents the sorting for the table.

sort?: Excel.Interfaces.TableSortData;

Property Value

Remarks

[ API set: ExcelApi 1.2 ]

source

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Retrieves the data source type from which the table originates.

source?: Excel.TableSource | "External" | "Range" | "Xml" | "Query" | "Model";

Property Value

Excel.TableSource | "External" | "Range" | "Xml" | "Query" | "Model"

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

style

Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified.

style?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.1 ]

tableStyle

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The style applied to the table.

tableStyle?: Excel.Interfaces.TableStyleData;

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]