Skip to main content

addColumn()

Description

Adds a new column into the spreadsheet

info

The method finds the specified cell, selects it, moves the column where the cell is located one cell left and adds an empty column instead.

Usage

addColumn(cell: string): void;

Parameters

  • cell - (required) the id of the cell that contains the id of a column that should be added

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);

// adds an empty "G" column
spreadsheet.addColumn("G1");

Related articles: Work with Spreadsheet