NativeExcel suite v2.x

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;
ShiftOleVariant. 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);
Copyright © NikaSoft 2004-2012