SpreadJS Documentation
getStyleName Method
The row index.
The column index.
The sheet area. If this parameter is not provided, it defaults to viewport.
Gets the name of the style for a specified cell in the specified sheet area.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: string
value = instance.getStyleName(row, column, sheetArea);
function getStyleName( 
   row : number,
   column : number,
   sheetArea : SheetArea
) : string;

Parameters

row
The row index.
column
The column index.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.

Return Value

Returns the name string for the style.
Example
This example uses the getStyleName method.
var namedStyle = new GcSpread.Sheets.Style();
namedStyle.name = "style1";
namedStyle.backColor = "green";
activeSheet.addNamedStyle(namedStyle);
activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is  green.
activeSheet.setStyleName(2, 1, "style1");
alert(activeSheet.getStyleName(1,1,GcSpread.Sheets.SheetArea.viewport));
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.