Spread.Sheets 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 GC.Spread.Sheets.Worksheet(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 GC.Spread.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,GC.Spread.Sheets.SheetArea.viewport));
See Also

Reference

Worksheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.