PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing the Graphic worksheets
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
xlsNbWorksheet (Function)
In French: xlsNbFeuille
Returns the number of worksheets found in an XLS file.
Note: In compatible mode, the number of worksheets is always equal to 1.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Example
FileIdentifier is int

// Open an XLS file
FileIdentifier = xlsOpen("C:\My documents\MyFile.XLS")
IF FileIdentifier <> -1 THEN
// Retrieve the numbers of worksheets found in the file
Info("The file contains " + xlsNbWorksheet(FileIdentifier) + " worksheets.")
END
Syntax

Syntax that is using the xlsDocument type Hide the details

<Result> = xlsNbWorksheet(<XLS Document>)
<Result>: Integer
  • Number of worksheets found in the XLS file,
  • -1 if an error occurred. To find out the error details, use xlsMsgError or ErrorInfo associated with the errMessage constant.
<XLS Document>: xlsDocument variable
Name of xlsDocument variable corresponding to the XLS file to close. The physical file associated with this variable (if it exists) is closed. The modifications performed in the file will not be saved before it is closed (use xlsSave if necessary).

Syntax kept for backward compatibility with version 12 Hide the details

<Result> = xlsNbWorksheet(<Identifier of XLS File>)
<Result>: Integer
  • Number of worksheets found in the XLS file,
  • -1 if an error occurred. To find out the error details, use xlsMsgError or ErrorInfo associated with the errMessage constant.
<Identifier of XLS File>: Integer
Identifier of XLS file to handle, returned by xlsOpen.
Remarks

Managing the Graphic worksheets

The Excel "Graphic" worksheets are ignored. Indeed, these worksheets have no cell and therefore they cannot be accessed.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xls.dll
Linux wd230xls.so
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment