SpreadJS Documentation > Sample Code > Sample Code for the Sheet > Changing the Sheet Names |
You can change the name of the sheets.
This example changes the sheet name and sets the sheet tab color.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); //Set the number of sheets to 5. spread.setSheetCount(5); //Change the sheet names spread.sheets[0].setName("The first sheet"); spread.sheets[1].setName( "The second sheet"); //Change sheet information such as sheet tab display color. spread.sheets[0].sheetTabColor("LemonChiffon"); }); |