AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos XLS
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Se utiliza para averiguar y modificar la hoja de trabajo actual en un archivo XLS.
Observaciones:
  • En el modo multihoja, las funciones utilizadas para gestionar los archivos XLS siempre se aplican a la hoja de trabajo actual.. Cuando se abre el archivo XLS, la primera hoja de trabajo del libro de trabajo es la hoja de trabajo actual..
  • Esta función no tiene ningún efecto en el modo compatible.
Ejemplo
// Open an XLS file
FileIdentifier is int
FileIdentifier = xlsOpen("C:\My Documents\Test.XLS")

// Operations on the XLS file
// ...

// Retrieve the current worksheet
Worksheet is int = xlsCurrentWorksheet(FileIdentifier)
Info("The current worksheet is " + Worksheet)
// Open an XLS file
FileIdentifier is int = xlsOpen("C:\My Documents\Test.XLS")

// Position on the last worksheet of the file
NbWorksheet is int = xlsNbWorksheet(FileIdentifier)
IF xlsCurrentWorksheet(FileIdentifier, NbWorksheet) = True THEN
Info("The current worksheet was modified.")
END
cMyXLSFile is xlsDocument
sMyFile is string = "File.xls" // Full name of the file to open
 
cMyXLSFile = xlsOpen(sMyFile, xlsWrite)
IF ErrorOccurred = False THEN
Azz is int = xlsCurrentWorksheet(cMyXLSFile)
Info("Current worksheet in the Excel file: " + Azz)
// Change worksheet
IF xlsCurrentWorksheet(cMyXLSFile, 2) = True THEN
Info("The current worksheet was modified.")
// Read a cell for test
Info(xlsData(cMyXLSFile, 11, 2))
ELSE
Error("The selected file does not include a second worksheet!")
END
ELSE
Error(ErrorInfo(errFullDetails))
END
xlsClose(cMyXLSFile)
Sintaxis

Averiguar la hoja de trabajo actual Ocultar los detalles

<Result> = xlsCurrentWorksheet(<XLS document>)
<Result>: Integro
Índice de la hoja de trabajo actual. Este valor se incluye entre 1 y xlsNbFicha de trabajo.
<XLS document>: Variable de tipo xlsDocument
Nombre de la variable de tipo xlsDocument que se utilizará.

Modificando la hoja de trabajo actual Ocultar los detalles

<Result> = xlsCurrentWorksheet(<XLS document> , <Worksheet number>)
<Result>: booleano
  • True si se modificó la hoja actual,
  • False en caso contrario (por ejemplo, si la hoja especificada en el parámetro <Número de hoja> no existe).
<XLS document>: Variable de tipo xlsDocument
Nombre de la variable de tipo xlsDocument que se utilizará.
<Worksheet number>: Integro
Índice de la nueva hoja de trabajo. Este valor se incluye entre 1 y xlsNbFicha de trabajo.

Averiguar la hoja de trabajo actual (sintaxis mantenida para compatibilidad con la versión 12) Ocultar los detalles

<Result> = xlsCurrentWorksheet(<XLS file identifier>)
<Result>: Integro
Índice de la hoja de trabajo actual. Este valor se incluye entre 1 y xlsNbFicha de trabajo.
<XLS file identifier>: Integro
Identificador del archivo XLS a manipular, devuelto por xlsAbrir.

Modificando la hoja de trabajo actual (sintaxis mantenida para compatibilidad con la versión 12) Ocultar los detalles

<Result> = xlsCurrentWorksheet(<XLS file identifier> , <Worksheet number>)
<Result>: booleano
  • True si se modificó la hoja actual,
  • False en caso contrario (por ejemplo, si la hoja especificada en el parámetro <Número de hoja> no existe).
<XLS file identifier>: Integro
Identificador del archivo XLS a manipular, devuelto por xlsAbrir.
<Worksheet number>: Integro
Índice de la nueva hoja de trabajo. Este valor se incluye entre 1 y xlsNbFicha de trabajo.
Componente: wd290xls.dll
Versión mínima requerida
  • Versión 11
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 07/04/2023

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