|
|
|
|
|
|
|
|
|
|
- Saving and loading a Pivot Table control
<Pivot Table>.Save (Function) In french: <Tableau croisé dynamique>.Sauve Saves the result of the calculation performed in a Pivot Table control (in a file or in memory). This result can be loaded again in a Pivot Table control using <Pivot Table>.Load. sFile is string
sFile = SysDir(srAppData) + ["\"] + "StatsByCountry.tcd"
IF fFileExist(sFile) THEN
PVT_Statistics.Load(sFile)
IF YesNo("Do you want to recalculate all?") THEN PVT_Statistics.CalculateAll()
ELSE
PVT_Statistics.CalculateAll()
END
PVT_Statistics.Save(sFile)
Syntax
Saving a Pivot Table control with its interface and a password Hide the details
<Result> = <Pivot Table control>.Save(<Save destination> [, <Save mode> [, <Password>]])
<Result>: Type according to save destination - Memory: Buffer containing the result. This result can be then saved in a file (using fSaveBuffer), etc.
- File:
- True if saved successfully,
- False otherwise.
<Pivot Table control>: Control name Name of the Pivot Table control to be used. <Save destination>: Character string or constant - To save the contents of the Pivot Table control to memory, use the inMemory constant. <Result> contains the result.
- To save the Pivot Table control as a file, specify the name and full path of the file.
<Save mode>: Optional Integer constant By default, only the data is saved. You can also save the Pivot Table control interface: | | | pvtWithUI | Saves the configuration of the Pivot Table control:- size of columns,
- size of rows,
- collapsed/expanded row headers or column headers.
Note: Before version 25, this constant was named pvtWithGUI. | If <Save mode> and <Password> are not specified, only the data in the Pivot Table control will be saved and the result will not be password protected. To save the data only and password-protect the result, use syntax 2. <Password>: Optional string or Secret string Result password. If the result is password protected, the password must be specified when <Pivot Table>.Load is used.
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.
Saving a Pivot Table control without its interface and with a password Hide the details
<Result> = <Pivot Table control>.Save(<Save destination> [, <Password>])
<Result>: Type according to save destination - Memory: Buffer containing the result. This result can be then saved in a file (using fSaveBuffer).
- File:
- True if saved successfully,
- False otherwise.
<Pivot Table control>: Control name Name of the Pivot Table control to be used. <Save destination>: Character string or constant - To save the contents of the Pivot Table control to memory, use the inMemory constant. <Result> contains the result.
- To save the Pivot Table control as a file, specify the name and full path of the file.
<Password>: Optional string or Secret string Result password. If the result is password protected, the password must be specified when <Pivot Table>.Load is used.
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 Saving and loading a Pivot Table control When the content of a Pivot Table control is calculated with <Pivot table>.CalculateAll, the result can be saved with <Pivot Table>.Save. Then, it can be loaded again using <Pivot Table>.Load. In this case, the content of the Pivot Table control is not recalculated.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|