HotXLS 文档

Move 方法

Moves the sheet to another location in the Workbook

语法

procedure Move(Before: TXLSWorksheet; After: TXLSWorksheet; lcid: Integer);
procedure Move(Before: TXLSWorksheet; After: TXLSWorksheet);
procedure Move(Before: TXLSWorksheet);
Before TXLSWorksheet。移动后的工作表将放在该工作表之前。指定了 After 就不能再指定 Before
After TXLSWorksheet。移动后的工作表将放在该工作表之后。指定了 Before 就不能再指定 After
lcid Integer. The locale ID

示例

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]);