Spread.Sheets Documentation
getNamedStyles Method
Gets named styles from the Workbook.
Syntax
var instance = new GC.Spread.Sheets.Workbook(host);
var value; // Type: Array
value = instance.getNamedStyles();
function getNamedStyles() : Array;

Return Value

The GC.Spread.Sheets.Style array of named styles.
Example
This example uses the getNamedStyles method.
var namedStyle1 = new GC.Spread.Sheets.Style();
namedStyle1.name = "style2";
namedStyle1.backColor = "blue";

var namedStyle = new GC.Spread.Sheets.Style();
namedStyle.name = "style1";
namedStyle.backColor = "green";
spread.addNamedStyle(namedStyle);
spread.addNamedStyle(namedStyle1);
activeSheet.setStyleName(1, 1, "style1"); 
activeSheet.setStyleName(2, 1, "style1");
 activeSheet.setStyleName(3, 0, "style2");
activeSheet.getCell(1,1).value("test");

var sname = spread.getNamedStyles();
for(var i = 0; i < sname.length; i++){
alert(sname[i].name);
}
See Also

Reference

Workbook type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.