remove()
Description
Removes a sheet from the spreadsheet by its identifier
If the removed sheet was active, the spreadsheet will automatically switch to another available sheet.
info
To apply this method, you need to enable the multiSheets configuration option.
Also note, that a sheet won't be deleted if the number of sheets in the spreadsheet is less than 2.
Usage
remove: (id: Id) => void;
Parameters
id- (string | number) required, the unique identifier of the sheet to remove.
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
multiSheets: true
});
spreadsheet.parse(data);
// Remove a sheet by its id
spreadsheet.sheets.remove("sheet_2");
Change log: Added in v6.0
Related articles: Working with sheets