SpreadJS 13
SpreadJS Documentation / Sample Code / Sample Code for the Sheet / Changing the Sheet Names
In This Topic
    Changing the Sheet Names
    In This Topic

    You can change the name of the sheets.

    Custom sheet names in a workbook

    Using Code

    This example changes the sheet name and sets the sheet tab color.

    Copy Code
    $(document).ready(function ()
       var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),
       // Set the number of sheets to 5.
       // Change the sheet names
       spread.sheets[0].name("The first sheet");
       spread.sheets[1].name( "The second sheet");
       // Change sheet information such as sheet tab display color.
       spread.sheets[0].options.sheetTabColor = "LemonChiffon";