Creates a new Worksheet. The new Worksheet becomes the active sheet
语法
| Before |
TXLSWorksheet,可选。一个对象,指定在其之前插入新工作表的工作表 |
| After |
TXLSWorksheet,可选。一个对象,指定在其之后插入新工作表的工作表。默认值为最后一个工作表 |
| Count |
Integer Optional. The number of sheets to be added. The default value is one |
| Type_ |
OleVariant,可选。指定工作表类型。可以是以下 XlSheetType 常量之一:xlWorksheet、xlChart、xlExcel4MacroSheet 或 xlExcel4IntlMacroSheet。默认值为 xlWorksheet。本库会忽略该参数 |
示例
This example creates new Worksheet and sets the name to it
Var Worksheet: TXLSWorksheet;
begin
Worksheet := Workbook.Sheets.Add;
Worksheet.Name := 'New sheet';
end;
This example creates new Worksheet after second Worksheet