Loads the result of the calculation performed in a Pivot Table control from a backup (file found on disk or backup in a buffer). This calculation was saved beforehand by PVTSave
sFile is string
// Builds the file name
sFile = SysDir(srAppData) + ["\"] + "StatsByCountry.tcd"
// The file exists?
IF fFileExist(sFile) THEN
// Yes, load it
IF YesNo("Do you want to recalculate everything?") THEN PVTCalculateAll(PVT_Statistics)
// The file does not exist, calculate it
<Result> = PVTLoad(<Pivot Table control> , <Backup media> [, <Password>])
- True if the content of the Pivot Table control was loaded.
- False otherwise
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Backup media>: Character string or Buffer
- Backup in a file: Name and full path of file to load. This file corresponds to a file previously saved with PVTSave.
- Backup in memory: Backup buffer returned by PVTSave.
<Password>: Optional character string
Password associated with the backup of the Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
Saving and loading the content of a Pivot Table control
When the Pivot Table control is calculated by PVTCalculateAll
, the result can be saved by PVTSave
. Then, it can be loaded again using PVTLoad
: in this case, the content of the Pivot Table control is not recalculated.