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
  • Presentación
  • Gestión dinámica de los archivos XLS y XLSX
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
Presentación
In prefix syntax, WINDEV and WEBDEV allow you to handle Excel files by Handling the XLS and XLSX worksheets dynamically.
This method uses different types of variables as well as WLanguage functions. This method allows you to manage the Excel files (XLS or XLSX files) in read and write mode.
Gestión dinámica de los archivos XLS y XLSX
To handle the XLS and XLSX files, the WLanguage proposes:
  • different types of variables. These types of variables are used to handle an XLS document, an XLS row or column, an XLS cell.
  • several WLanguage functions that handle the different types of data.
To handle the XLS and XLSX files:
  1. Declare a variable of type xlsDocument. This type of variable is used to describe and modify an Excel document.
  2. If necessary, open the XLS file (function xlsOpen) and link it to the Variable of type xlsDocument.
  3. The different elements in the Excel document can be handled:
    • with the WLanguage functions.
    • or with properties of the type xlsDocument .
Example:
MonFicXLS is xlsDocument 
UnFichier is string 
UnFichier = fExeDir + "\Suivi d'affaires1.xls"

MonFicXLS = xlsOpen(UnFichier, xlsWrite)
IF ErrorOccurred = False THEN
	Azz is int = MonFicXLS..Worksheet
	Info("Feuille en cours dans le fichier Excel: " + Azz)
	// Changement de feuille
	IF MonFicXLS..Worksheet = 2 THEN
		Info("La feuille courante a été modifiée.")
		// Lecture d'une cellule pour test
		Info(xlsData(IDFicXLS, 11, 2))
	ELSE
		Error("Le fichier sélectionné ne comporte pas de seconde feuille!")
	END 
ELSE
	Error("Attention! le fichier est déjà ouvert sur un poste de travail!")
END
Remarks:
  • If the Excel file is opened in read/write mode (xlsWrite constant), the file is opened and locked until it is closed. To save the modifications performed, use <xlsDocument Variable>Guardar.
  • The XLS functions do not require "Microsoft Excel" to be installed on the user computers.
  • The XLS files and the files specific to Office 2007 (.xlsx files) are supported.
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 05/06/2024

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