Use the addSheet, removeSheet, clearSheets functions to add, remove or clear sheets.
Use the following steps to reference Spread and work with the sheets.
Similar to other libraries, Sheet requires the following included files:
Create a sheet using the following code (the parameter is the sheet's name).
var sheet = new GC.Spread.Sheets.Worksheet('NewSheet');
Add it at the specified position of an existing Spread component.
spread.addSheet(0, sheet);
If you want to remove an existing sheet from the Spread component, use the following code. This example code removes the first sheet in the Spread.
spread.removeSheet(0);
If you want to remove all the sheets in the Spread component, use the convenient clearSheets method.
spread.clearSheets();
If you want to customize the sheet's name, use the name methods to get and set the sheet's name.
var sheetName = sheet.name();
sheet.name('sheet1');
Submit and view feedback for