remove()
Description
Removes a sheet from the spreadsheet by its identifier
If the removed sheet was active, the spreadsheet automatically switches to another available sheet.
info
To apply this method, you need to enable the multiSheets configuration option.
Also note that a sheet is not deleted if the spreadsheet has fewer than 2 sheets.
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 article: Working with sheets