Home | Sign in | English EN
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
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).
Reports and QueriesUser code (UMC)
sFile is string
// File name
sFile = fSelect("", "", "Choose the export file", ...
"Excel files (*.xls) *.xls", "xls", fselCreate + fselExist)
// The export is canceled if no name was specified
// Otherwise, export the content of the LOOP_Customer Looper control
IF sFile <> "" THEN LooperToExcel(LOOP_Customer, sFile)
sFile is string
sFile = CompleteDir(fDataDir()) + "\Export.xls"
IF sFile <> "" THEN LooperToExcel(LOOP_Customer, sFile)
<Result> = LooperToExcel(<Looper control> , <Name of XLS file> [, <Options> [, <Start row> [, <End row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise. To get the details of the error, use ErrorInfo.
<Looper control>: Control name
Name of Looper control to use.
<Name of XLS file>: Character string (with quotes)
Name and full path of Excel file to create. The file is replaced by the new file if it already exists.
<Options>: Optional Integer constant
Configures the XLS file to create.
Versions 23 and later
New in version 23
Exports the color and the font used in the control.
Versions 23 and later
New in version 23
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.
taSelectedLinesExports the selected rows only (all the rows are exported by default).
Versions 23 and later
New in version 23
Only the data is copied into the file. The name of attributes is not specified in column title in the Excel file.
(default value)
The name of attributes is used in the Excel file as title of columns.
<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.
  • The 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.
Component: wd260xls.dll
Minimum version required
  • Version 10
This page is also available for…
Click [Add] to post a comment