ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Exporting the query content
  • Array items
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Exports records from a data file (HFSQL or OLE DB), view or query to an Excel file (XLSX).
New in version 2025
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Java This function is now available for Java applications.
Example
// Export all customers from the Customer data file
Customer.ExportXLS("C:\TEMP\Customer.xlsx", hExpCreation)
Syntax
<Result> = <Source>.ExportXLS(<Excel file path> , <List of items to export> [, <Options> [, <Progress Bar>]])
<Result>: Boolean
  • Trueif the operation has been performed,
  • False if a problem occurs. HError is used to identify the error.
<Source>: Type corresponding to the specified source
Name of the data file, view or query used.
<Excel file path>: Character string
Full path of the Excel (XLSX) file to be generated.
If this parameter is not specified, a <File name>.XLSX file will be generated in the current directory.
<List of items to export>: Character string
List of names of items to export. Names are delimited by single quotes and separated by commas or CR characters. The names of composite key items, binary items and binary memo items are ignored.
If this parameter corresponds to an empty string (""), all the items in the data file (except composite key, binary and binary memo items) are exported.
Note: For Text Memo fields, depending on the size of the memo, exported data may be truncated by Excel.
<Options>: Optional Integer constant
Specifies the creation mode of the Excel file:
hExpBreakableThe export can be interrupted by pressing Esc.
If the export is interrupted, the XLSX file is valid and contains only the records exported before the interruption.
hExpCreationIf the XLSX export file already exists, it is overwritten. An error occurs if this option is not specified and if the XLSX file exists.
hExpNoLineItemNameThe first line of the XLSX file will not contain the names of the items.
hExpNormal
(default value)
Standard operating mode.
<Progress Bar>: Optional control name or window name
Name of ProgressBar field, or name of window displaying Excel file creation progress.
Remarks

Exporting the query content

To export the query content, you must initialize the query (<Source>.ExecuteQuery) before using <Source>.ExportXLS.

Array items

If one of the exported items is an array item, each element of the array item <ARRAYITEM> is exported in a <ARRAYITEM>_<Item subscript> item.
Reminder: Compound key, binary memo and binary fields are ignored.
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/06/2024

Send a report | Local help