Creates a new Worksheet before specified Worksheet. The new Worksheet becomes the active sheet
Syntax
| Index |
Integer. An index of Worksheet that specifies the sheet before which the new sheet is added |
| Name |
WideString. A name of Worksheet that specifies the sheet before which the new sheet is added |
| Worksheet |
TXLSWorksheet. An object that specifies the sheet before which the new sheet is added |
Example
This example creates new Worksheet before the sheet with name 'Sheet1'
Var Worksheet: TXLSWorksheet;
begin
Worksheet := Workbook.Sheets.AddBefore('Sheet1');
Worksheet.Name := 'Before Sheet1';
end;
This example creates new Worksheet before second Worksheet