SpreadJS Documentation > Sample Code > Sample Code for Rows and Columns > Setting the Number of Rows and Columns |
You can specify the number of rows and columns.
This example sets the number of rows and columns.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); //Set the number of rows and columns to 3. sheet.setRowCount(3, GcSpread.Sheets.SheetArea.viewport); sheet.setColumnCount(3, GcSpread.Sheets.SheetArea.viewport); }); |