PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Creates an Excel file from the data found in a Looper control (browsing Looper control or memory Looper control).
Note: This file can be opened by Excel or by OpenOffice Calc (depending on the software installed on the current computer).
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 23 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 23
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Example
WINDEVReports 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 LOOP_Customer
IF sFile <> "" THEN LooperToExcel(LOOP_Customer, sFile)
WEBDEV - Server codeAjax
sFile is string
sFile = CompleteDir(fDataDir()) + "\Export.xls"
IF sFile <> "" THEN LooperToExcel(LOOP_Customer, sFile)
Syntax
<Result> = LooperToExcel(<Looper Control> , <Name of XLS File> [, <Options> [, <Source Row> [, <End Row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise. To find out the error details, 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
taWithLayout
New in version 23
taWithLayout
taWithLayout
Exports the color and the font used in the control.
Versions 23 and later
taMerge
New in version 23
taMerge
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.
taSelectedLinesExports the selected rows only (all the rows are exported by default).
Versions 23 and later
taNoTitle
New in version 23
taNoTitle
taNoTitle
Only the data is copied into the file. The name of attributes is not specified in column title in the Excel file.
taColumnsTitles
(default value)
The name of attributes is used in the Excel file as title of columns.
<Source Row>: Optional integer
Number of the row from which the export will start.
If this parameter is not specified, the source row is 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.
Remarks
  • 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.
  • The columns in Unicode format are exported in Unicode format into 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xls.dll
Linux wd230xls.so
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment