PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

New WINDEV, WEBDEV, WINDEV Mobile 24 feature!
  • Exporting the query content
  • Array items
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
Exports records from a data file (HFSQL or OLE DB), view or query to an Excel file (XLSX).
Example
// Exports all customers from the CLIENT file
HExportXLS(CUSTOMER, "C:\TEMP\Customer.xls", hExpCreation)
Syntax
<Result> = HExportXLS(<File name> , <Excel file path> , <List of items to export> [, <Options> [, <Progress bar>]])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<File name>: Character string (with or without quotes)
Name of data file used. If this name is not specified, HExportXLS handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Excel file path>: Character string (with quotes)
Full path of Excel (XLSX) file to generate.
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. The 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.
<Options>: Optional Integer constant
Specifies the creation mode of the Excel file:
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.
hExpBreakableThe export can be interrupted by pressing the Esc key on the keyboard.
If the export is interrupted, the XLSX file is valid and contains only the records exported before the interruption.
hExpNormal
(default value)
Standard operating mode.
hExpNoLineItemNameThe first line of the XLSX file will not contain the names of the items.
<Progress bar>: Optional character string
Name of Progress Bar control or name of window used to show the progress of Excel file creation.
Remarks

Exporting the query content

To export the query content, you must initialize the query (HExecuteQuery) before using HExportXLS.

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: The Composite Key items, Binary Memo items or Binary items are ignored.
Component : wd240hf.dll
Minimum required version
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment