ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XLS file functions
  • Caption of a column in an XLS file
xlsColumnTitle (Example)
Caption of a column in an XLS file
The following code is used to find out the caption of a column in an XLS file. The columns that are entirely empty are not taken into account (True). This file was opened by xlsOpen.
// Declare the variables
XLSFileID is int
ResColumnTitle is string
// Open an XLS file
XLSFileID = xlsOpen("C:\MyDirectories\MyFiles\File.XLS")
IF XLSFileID <> -1 THEN
// Column Title
ResColumnTitle = xlsColumnTitle(XLSFileID, 3, True)
IF ResColumnTitle <> xlsTitleError THEN
IF ResColumnTitle = "" THEN
// The column has no title
Info("The column has no title")
ELSE
 // Display the title of the column
 Info("The title of the column is: " + ResColumnTitle)
END
ELSE
// Display an error message if the retrieval was not performed
Error(xlsMsgError(XLSFileID))
END
ELSE
// Display an error message if the opening was not performed
 Error(xlsMsgError(XLSFileID))
END
// Close the XLS file
xlsClose(XLSFileID)
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