PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Saving and loading a pivot table
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Loads the result of the calculation performed in a Pivot Table control from a file found on disk. This calculation was saved beforehand in a file by PVTSave.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.
Example
sFile is string
// Builds the file name
sFile = SysDir(srAppData) + ["\"] + "StatsByCountry.tcd"

// The file exists?
IF fFileExist(sFile) THEN
// Yes, load it
PVTLoad(PVT_Statistics, sFile)
IF YesNo("Do you want to recalculate everything?") THEN PVTCalculateAll(PVT_Statistics)
ELSE
// The file does not exist, calculate it
PVTCalculateAll(PVT_Statistics)
END
PVTSave(PVT_Statistics, sFile)
Syntax
<Result> = PVTLoad(<Pivot Table> , <File to Load> [, <Password>])
<Result>: Boolean
  • True if the pivot table was loaded.
  • False otherwise
<Pivot Table>: Character string (with or without quotes)
Name of Pivot Table control to use.
<File to Load>: Character string (with quotes)
Name and full path of file to load. This file corresponds to a file that was saved beforehand by PVTSave.
<Password>: Optional character string (with quotes)
Versions 19 and later
Password associated with the backup file of Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
New in version 19
Password associated with the backup file of Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
Password associated with the backup file of Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
<Result> = PVTLoad(<Pivot Table Control> , <Backup Media> [, <Password>])
<Result>: Boolean
  • True if the pivot table was loaded.
  • False otherwise
<Pivot Table Control>: Control name
Name of Pivot Table control to use.
<Backup Media>: Character string (with quotes) or buffer
  • Backup in a file: Name and full path of file to load. This file corresponds a file that was saved beforehand by PVTSave.
  • Versions 21 and later
    Backup in memory: Buffer constant for backup returned by PVTSave.
    New in version 21
    Backup in memory: Buffer constant for backup returned by PVTSave.
    Backup in memory: Buffer constant for backup returned by PVTSave.
<Password>: Optional character string (with quotes)
Versions 19 and later
Password associated with the backup of the Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
New in version 19
Password associated with the backup of the Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
Password associated with the backup of the Pivot Table control. This password was specified when the Pivot Table control was saved by PVTSave.
Remarks

Saving and loading a pivot table

When the pivot table is calculated by PVTCalculateAll, the result can be saved by PVTSave. Then, it can be reloaded by PVTLoad: in this case, the pivot table is not recalculated.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment