getTableStyleState(sender: PP.Ui.IconListItem);
sender. Item selected in the Style and Formatting menu in the Table tab of the tool ribbon.
The getTableStyleState method returns current settings of workbook table.
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.
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: