TTMSFNCDataGridExcelIO.XLSExport Method
Exports the DataGrid content to the specified XLS/XLSX file, optionally targeting a named sheet at a given position.
API unit family: TMSFNCDataGridExcelIO
Declaring type: TTMSFNCDataGridExcelIO
Syntax
procedure XLSExport(const FileName: TFileName; const SheetName: UTF16String = ''; const SheetPos: integer = -1; const SelectSheet: integer = 1; const InsertInSheet: TInsertInSheet = InsertInSheet_Clear);
Parameters
| Name | Description |
|---|---|
FileName |
Destination XLS or XLSX file path. |
SheetName |
Worksheet name to create or update. Leave empty to use the default sheet name. |
SheetPos |
Zero-based insertion position for a new worksheet, or -1 to use the default position. |
SelectSheet |
One-based worksheet index to select after export. |
InsertInSheet |
How exported data is inserted into an existing worksheet. |