PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Column caption
  • Managing errors
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
Retrieves the title of a column found in an XLS file. The result depends on the opening mode of XLS file:
  • In multi-sheet mode, the column title is sought for the worksheet selected by xlsCurrentWorksheet.
  • In compatible mode, the column title is always sought for the first worksheet of workbook.
Note: The title of a column in an XLS file is returned if:
  • The XLS file exists.
  • The XLS file is opened.
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.
// Open an XLS file
XLSFileID = xlsOpen("C:\MyDirectory\File.XLS")
IF XLSFileID <> -1 THEN
// Retrieve the caption of a column
ResColumnTitle = xlsColumnTitle(XLSFileID, 4)
...
END
Syntax

Syntax that is using the xlsDocument type Hide the details

<Result> = xlsColumnTitle(<XLS Document> , <Column Number> [, <Empty Columns>])
<Result>: Character string
  • Caption of specified column,
  • xlsTitleError constant 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 use.
<Column Number>: Integer
Number of the column to read.
<Empty Columns>: Optional boolean
Mode for taking the empty columns into account:
True
(by default)
The columns that are entirely empty are ignored
FalseThe columns that are entirely empty are taken into account

Syntax kept for backward compatibility with version 12 Hide the details

<Result> = xlsColumnTitle(<Identifier of XLS File> , <Column Number> [, <Empty Columns>])
<Result>: Character string
  • Caption of specified column,
  • xlsTitleError constant 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.
<Column Number>: Integer
Number of the column to read.
<Empty Columns>: Optional boolean
Mode for taking the empty columns into account:
True
(by default)
The columns that are entirely empty are ignored
FalseThe columns that are entirely empty are taken into account
Remarks

Column caption

The empty columns can be taken into account or not. For example:
xlsColumnTitle(XLSFileID, 3, True) // Returns "Age"
xlsColumnTitle(XLSFileID, 3, False) // Returns ""

Managing errors

xlsColumnTitle generates an error in the following cases:
  • The specified column does not exist (negative column for example).
  • The specified XLS file is not opened.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xls.dll
Linux wd230xls.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment