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 / Controles, páginas y ventanas / Funciones Hoja de cálculo
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Saves the contents of a Spreadsheet control to a file. The supported formats are:
  • XLSX (Excel workbook),
  • XLSM (Excel macro-enabled workbook),
  • XLTX (Excel template),
  • XLTM (Excel macro-enabled template),
  • Novedad versión 2025
    CSV (csv file).
Ejemplo
// Sauvegarde du fichier en cours
TBLR_Tableur.Sauve("Classeur1.XLSX")
// Chargement du fichier
TBLR_SansNom1.Charge("test.xlsx")
// Modification du fichier
TBLR_SansNom1["A","1"] = "modifié"
// Sauvegarde sous un autre nom
// Le fichier "text1.xlsx" existe déjà
IF TBLR_SansNom1.Sauve("test1.xlsx") = False THEN
	// Avant la version 200051, le fichier xlsx existant est écrasé. 
	// A partir de la version 200051, le fichier xlsx existant n'est pas modifié. 
	// La fonction renvoie Faux et une erreur 
	// Pour écraser le fichier, utilisez la constante tblrEcrasementAutorisé
	Error("Fichier non sauvegardé " + ErrorInfo()
ELSE
	Info("Fichier sauvegardé")
END
Sintaxis
<Result> = <Spreadsheet control>.Save(<File to save> [, <Option> [, <Password>]])
<Result>: booleano
  • True if the file of Spreadsheet control was saved,
  • False otherwise. ErrorInfo returns more details about the error.
<Spreadsheet control>: Nombre del control
Name of the Spreadsheet control to be used.
<File to save>: Cadena de caracteres
Name and full path of the file where the content of Spreadsheet control will be saved. The file extension defines the backup format. The supported formats are:
  • XLSX (Excel workbook),
  • XLSM (Excel macro-enabled workbook),
  • XLTX (Excel template),
  • XLTM (Excel macro-enabled template),
  • Novedad versión 2025
    CSV (csv file).
    Note: only the current sheet is saved. Only cell values are saved. For example, formulas are not saved, but only their result.
<Option>: Constante opcional de tipo Integer
File save mode if the file already exists:
0 (or nothing)
(Default behavior)
If the XLSX file already exists and is not open (in the Spreadsheet control or another application), it is not saved.
psheetOverwriteAllowedIf the XLSX file already exists and is not open (in the Spreadsheet control or another application), it is overwritten.
<Password>: Cadena opcional o cadena secreta
Password to use to protect the XLSX file at opening. This password must be specified to open the XLSX file.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.
Observaciones
  • To open the ".xlxs" file saved with another application, it must be closed by <Spreadsheet>.Close.
  • The saved file can be reloaded in a Spreadsheet control via <Spreadsheet>.Load and xlsOpen.
  • This function can only be used on a Spreadsheet control found in a window.
  • <Spreadsheet>.Save updates the FilePath property of Spreadsheet control by associating the name of loaded file to the Spreadsheet control.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 16/05/2025

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