TableCatView.getTableStyleState

Syntax

getTableStyleState(sender: PP.Ui.IconListItem);

Parameters

sender. Item selected in the Style and Formatting menu in the Table tab of the tool ribbon.

Description

The getTableStyleState method returns current settings of workbook table.

Comments

The method returns a JSON object with the following fields: Name - setting name, PredefinedStyle - name of the table style set using the PP.Exp.Ui.TabTablePredefinedStyle enumeration.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component),and the Table tab must be open in workbook ribbon. Get name of the current table style:

// Get ribbon
var ribbon = workbookBox.getRibbonView();
// Get the Table tab
var tableCatView = ribbon.getTableCategory();
// Create all tab elements
tableCatView.renderContent();
// Get settings of the current table style
var tableStyleState = tableCatView.getTableStyleState();
console.log("Table style setting name: " + tableStyleState.Name);
console.log("Current table style name: " + tableStyleState.PredefinedStyle);

After executing the example the browser console displayed settings of the current table style in the workbook:

Table style setting name: EAX table style

Name of the current table style: ExtBlueStriped

See also:

TableCatView