PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Creates an Excel file from the data found in a pivot table.
Example
sFile is string

// Builds the file name
sFile = SysDir(srAppData) + ["\"] + "StatsByCountry.xls"

PVTToExcel(PVT_Statistics, sFile)
ShellExecute(SysDir(srAppData) + ["\"] + "StatsByCountry.xls")
Syntax
<Result> = PVTToExcel(<Pivot Table Control> , <Name of XLS File> [, <Options>])
<Result>: Boolean
  • True if the file was created,
  • False otherwise. To find out the error details, use ErrorInfo.
<Pivot Table Control>: Control name
Name of Pivot Table control to use.
<Name of XLS File>: Character string (with quotes)
Name and full path of Excel file to create. The file is replaced by the new file if it already exists.
<Options>: Optional constant
Configuration of XLS file to create.
taWithLayoutExports the color and font of the table.
taNoTitleOnly the data is copied into the file.
taColumnsTitles
(default value)
The title of columns is inserted into the file.
Remarks
  • The Excel files cannot exceed 65536 rows and 256 columns if the extension used is ".xls". This limit can be exceeded by using the ".xlsx" extension in order to create files in Excel 2007 format. Caution: in this case, the former versions of Excel must be equipped with the "Compatibility Pack Office 2007" that can be freely downloaded from the Microsoft site in order to open the generated documents.
  • The created file can be opened by Excel 97 (or later) or by OpenOffice Calc 2 (or later).
Components
WINDEVReports and Queries wd230xls.dll
Minimum required version
  • Version 18
This page is also available for…
Comments
//Pivo - Exportar Excel
_Curso_Pivo, Pivo, PIVOT,
//Pivo - Exportar Excel

s_arquivo is string="E:\aleva\excel\pivo.xls"
PVTToExcel(TCD_cliente_vencimento,s_arquivo,taWithLayout)
ShellExecute(s_arquivo)


// Blog com Video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/04/curso-windev-pivo-pvt-007-exportar-pivo.html
De matos AMARILDO
Apr. 15 2016