ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XLS file functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
xlsVersion (Function)
In french: xlsVersion
Returns the Excel version that was used to save the file. The latest version number is returned if several versions have been used.
Remark: The Excel version can be known:
  • if the Excel file exists.
  • if the Excel file is opened.
Example
// Open an XLS file
XLSFileID = xlsOpen("C:\MyDirectory\File.XLS")
...
// Excel version
ResVersion = xlsVersion(XLSFileID)
Syntax

Syntax that is using the xlsDocument type Hide the details

<Result> = xlsVersion(<XLS document>)
<Result>: Integer
  • Excel vesion (3, 4, 5, 8), 100 for the XLSX files. The latest version number is returned if several versions have been used.
  • 0 if an error occurs. To get more details on the error, use xlsMsgError or ErrorInfo with the errMessage constant.
<XLS document>: xlsDocument variable
Name of the xlsDocument variable corresponding to the XLS file to use.

Syntax kept for backward compatibility with version 12 Hide the details

<Result> = xlsVersion(<XLS file identifier>)
<Result>: Integer
  • Excel vesion (3, 4, 5, 8), 100 for the XLSX files. The latest version number is returned if several versions have been used.
  • 0 if an error occurs. To get more details on the error, use xlsMsgError or ErrorInfo with the errMessage constant.
<XLS file identifier>: Integer
Identifier of the XLS file to handle, returned by xlsOpen.
Remarks
xlsVersion throws an error in the following cases:
  • the specified XLS file is not opened.
  • the Excel version in unknown.
Component: wd290xls.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help