| sidebar_label | deleteColumn() |
|---|---|
| title | deleteColumn method |
| description | You can learn about the deleteColumn method in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet. |
@short: Removes a column from the spreadsheet
:::info The method finds the specified cell, selects it, removes the column where the cell is located and moves the column on the left to its position. :::
deleteColumn(cell: string): void;cell- (required) the id of a cell that contains the name of the column that should be deleted
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
// removes the "G" column
spreadsheet.deleteColumn("G2");Related articles: Work with Spreadsheet