HotXLS Docs

Insert method

Inserts a cell or a range of cells into the Worksheet and shifts other cells away to make space.

Syntax

function Insert(Shift: OleVariant): OleVariant;
Shift OleVariant. Specifies which way to shift the cells. Can be one of the following XlInsertShiftDirection constants: xlShiftToRight or xlShiftDown.

Example

This example inserts a new row before row 3.

Workbook.Sheets[1].Range['A3', 'A3'].EntireRow.Insert(xlShiftDown);