SpreadJS 13
SpreadJS Documentation / Sample Code / Sample Code for Rows and Columns / Setting the Number of Rows and Columns
In This Topic
    Setting the Number of Rows and Columns
    In This Topic

    You can specify the number of rows and columns.

    Using Code

    This example sets the number of rows and columns.

    JavaScript
    Copy Code
    $(document).ready(function () 
    {
        var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),
        {sheetCount:3});
        var sheet = spread.getActiveSheet();
        
        // Set the number of rows and columns to 3.
        sheet.setRowCount(3, GC.Spread.Sheets.SheetArea.viewport);
        sheet.setColumnCount(3, GC.Spread.Sheets.SheetArea.viewport);
    });