SpreadJS Documentation
getRowCount Method
The sheet area. If this parameter is not given, it defaults to viewport.
Gets the row count in the specified sheet area.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: number
value = instance.getRowCount(sheetArea);
function getRowCount( 
   sheetArea : SheetArea
) : number;

Parameters

sheetArea
The sheet area. If this parameter is not given, it defaults to viewport.

Return Value

The number of rows.
Example
This example gets the row count.
var count = activeSheet.getRowCount(GcSpread.Sheets.SheetArea.viewport);
alert(count);
This example uses a loop to set the values in cells.
for (var i = 0; i < sheet.getRowCount(); i++)
  {
    sheet.setValue(i,1, i);
  }
sheet.getColumn(1).backColor("Gray");
sheet.getColumn(1).foreColor("Red");
sheet.getColumn(1).formatter("0.00");
sheet.getColumn(1).borderBottom(new GcSpread.Sheets.LineBorder("Green", GcSpread.Sheets.LineStyle.thin));
sheet.getColumn(1).borderTop(new GcSpread.Sheets.LineBorder("Green",  GcSpread.Sheets.LineStyle.thin));
sheet.getColumn(1).borderLeft(new GcSpread.Sheets.LineBorder("Green",  GcSpread.Sheets.LineStyle.thin));
sheet.getColumn(1).borderRight( new GcSpread.Sheets.LineBorder("Green",  GcSpread.Sheets.LineStyle.thin));
sheet.getColumn(1).font("italic bold 12px/30px arial,sans-serif");
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.