AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos XLS
  • 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)
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local