HotXLS Delphi Excel Read Write Library / Component Developers Guide loslab Inc.

Move method

Moves the sheet to another location in the Workbook.

Syntax

procedure Move(Before: IXLSWorksheet; After: IXLSWorksheet; lcid: Integer);
procedure Move(Before: IXLSWorksheet; After: IXLSWorksheet);
procedure Move(Before: IXLSWorksheet);
Before IXLSWorksheet. The sheet before which the moved sheet will be placed. You cannot specify Before if you specify After.
After IXLSWorksheet. The sheet after which the moved sheet will be placed. You cannot specify After if you specify Before.
lcid Integer. The locale ID.

Example

This example moves the first sheet after the third sheet in the Workbook.

Workbook.Sheets[1].Move(nil, Workbook.Sheets[3]);
This example moves the second sheet before the first sheet in the Workbook.

Workbook.Sheets[2].Move(Workbook.Sheets[1]);
Copyright©2007-2019 loslab.com