//setDefaultStyle
activeSheet.setRowCount(5, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setColumnCount(5, GcSpread.Sheets.SheetArea.viewport);
//Set the default styles.
var defaultStyle = new GcSpread.Sheets.Style();
defaultStyle.backColor = "LemonChiffon";
defaultStyle.foreColor = "Red";
defaultStyle.formatter = "0.00";
defaultStyle.hAlign = GcSpread.Sheets.HorizontalAlign.center;
defaultStyle.borderLeft = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderTop = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderRight = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderBottom = new GcSpread.Sheets.LineBorder("Green");
activeSheet.setDefaultStyle(defaultStyle, GcSpread.Sheets.SheetArea.viewport);
var rowCount = activeSheet.getRowCount();
var colCount = activeSheet.getColumnCount();
for(var i = 0; i < rowCount; i++){
for(var j = 0; j < colCount; j++){
activeSheet.setValue(i, j, i+j, GcSpread.Sheets.SheetArea.viewport);
}
}