SpreadJS Documentation
Adding a Sheet

You can add sheets to the widget.

Using Code

This example adds a sheet.

JavaScript
Copy Code
$(document).ready(function () {
    //Set the number of sheets to 3.
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});

    $("#button1").click(function(){
        // Create a new sheet and add it at 2nd position.
        var sheet = new GcSpread.Sheets.Sheet();
        sheet.setName("The added sheet");
        $("#ss").data("spread").addSheet(1, sheet);
    });
});

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.