|
|
|
|
|
SpreadsheetLoad (Function) In french: TableurCharge Load a file into a Spreadsheet control in a window. The supported formats are: - XLSX (Excel workbook),
- XLSM (Excel macro-enabled workbook),
- XLTX (Excel template),
- XLTM (Excel macro-enabled template),
New in version 2025CSV (csv file).
SpreadsheetLoad(TBLR_Tableur, "Classeur1.XLSX", 2)
Syntax
<Result> = SpreadsheetLoad(<Spreadsheet control> , <File to load> [, <Worksheet number> [, <Option> [, <Password>]]])
<Result>: Boolean - True if the file was loaded in the Spreadsheet control,
- False otherwise.
<Spreadsheet control>: Control name Name of Spreadsheet control used. <File to load>: Character string Name and full path of the file to be loaded. The supported formats are: - XLSX (Excel workbook),
- XLSM (Excel macro-enabled workbook),
- XLTX (Excel template),
- XLTM (Excel macro-enabled template),
New in version 2025CSV (csv file). Warning: It is not possible to load an XLSX file containing more than 2 million cells. <Worksheet number>: Optional integer - Number of the worksheet to load.
- -1 to use the default behavior:
- If the Spreadsheet control is in multi-worksheet mode, all the worksheets will be loaded.
- If the Spreadsheet control is not in multi-worksheet mode, only the first worksheet will be loaded.
<Option>: Integer constant Mode for opening the XLSX file to load: | | psheetLoadDefault (Default value) | The XLSX file loaded in the Spreadsheet control is opened in write mode. In this mode, to open the ".xlxs" file with another application, it must be closed by SpreadsheetClose. | psheetLoadKeepPassword | The password of the XLSX file loaded in the Spreadsheet control is kept in memory. When saving the file ("Save as" or SpreadsheetSave), it will not be necessesary to specify the file password again.. The password will be kept. | psheetLoadUnlinked | The XLSX file loaded in the Spreadsheet control is loaded in memory only. The ".xlxs" file can be opened by another application. To save the modified data, you must use SpreadsheetSave associated with the psheetOverwriteAllowed constant. In this case, the data modified by another application will be overwritten. |
<Password>: Optional string or Secret string Password to open the XLSX file to use (if the file is protected by a password).
New in version 2025Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string". To learn more about secret strings and how to use the vault, see Secret string vault. Remarks - The file content is loaded in the Spreadsheet control.
- The former content is deleted.
- The formulas are calculated.
- Some Excel features are not supported.
- The size of the XLSX files that can be loaded is limited to 2 million cells.
- This function can only be used on a Spreadsheet control found in a window.
- SpreadsheetLoad updates the FilePath property of Spreadsheet control by associating the name of loaded file to the Spreadsheet control.
Related Examples:
|
Unit examples (WINDEV): The Spreadsheet control
[ + ] Using the Spreadsheet control. This example explains how to: - load an xlsx file in a spreadsheet control, - save the spreadsheet in a file, - fill the control with data coming from the database, - insert rows, columns, - access the cells and handle them (modify their value, their style, ...), - enter formulas, - ...
|
Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|