In french: <Zone répétée>.VersExcel
Creates an Excel file from the data found in a Looper control (browsing Looper control or memory Looper control).
Remark: This file can be opened by Excel or by OpenOffice Calc (depending on the software installed on the current computer).
sFile is string
sFile = CompleteDir(fDataDir()) + "\Export.xls"
IF sFile <> "" THEN
<Result> = <Looper control>.ToExcel(<Name of XLS file> [, <Options> [, <Start row> [, <End row>]]])
- True if the file was created,
- False otherwise. To get more details on the error, use ErrorInfo.
<Looper control>: Control name
Name of the Looper control to be used.
<Name of XLS file>: Character string
Name and full path of Excel file to create. The file is replaced with the new file if it already exists.
<Options>: Optional Integer constant
Configures the XLS file to create.
|The name of attributes is used in the Excel file as title of columns.|
|taMerge||If the XLS file already exists, merges the existing content with the new content: the formulas, the formatting, ... of existing cells is kept. The existing data is not stored. Only the data of columns and rows found as well in the existing XLS file is kept.|
|taNoTitle||Only the data is copied to the file. The name of attributes is not specified in column title in the Excel file.|
|taSelectedLines||Exports the selected rows only (all the rows are exported by default). |
|taWithLayout||Exports the color and the font used in the control.|
<Start row>: Optional integer
Number of the row from which the export will start.
If this parameter is not specified, the start row will be the first row found in the Looper control.
<End row>: Optional integer
Number of the row where the export will end.
If this parameter is not specified, the end row is the last row found in the Looper control.
- The Excel files cannot exceed 65536 rows and 256 columns (which means 65536 rows containing 256 controls each). This limit can be exceeded by using the ".xlsx" extension in order to create files in Excel 2007 format. Caution: in this case, the former versions of Excel must be equipped with the "Compatibility Pack Office 2007" that can be freely downloaded from the Microsoft site in order to open the generated documents.
- Only the first 256 characters of each control are exported.
- The created file can be opened by Excel 97 (or later) or by OpenOffice Calc 2 (or later).
- The "High-Precision Numeric" columns (38 significant digits) will be exported as exponential number.
- Unicode columns are exported in Unicode format to Excel.
- Check Box columns are exported as Check Boxes.
- The following elements are not exported into the Excel file:
- The images,
- The charts,
- The bar codes.
This page is also available for…