ph_exportdata PowerHome formula function
Description
Exports data from a specified Data
Retrieval Area
Syntax
ph_exportdata ( i_dsvar, ai_exporttype, ai_colheading, as_filename )
Argument | Description |
i_dsvar | Integer. The number of the data retrieval area
to export. Valid values are 1 thru 20. |
ai_exporttype | Integer. The type of export to be performed.
See Usage below for valid values. |
ai_colheading | Integer. Specifies whether to include column
headings in the export or not. Use 0 to not include headings. Any other
value to include headings. |
as_filename | String. The full path and filename to save the
exported data to. |
Return value
Integer. Returns 0 if successful.
Returns -1 if the specified data retrieval area in i_dsvar is out
range (less than 1 or greater than 20). Returns -2 if data retrieval
area is not valid (has not been declared). Returns -3 if the
export operation fails.
Usage
Use
this function to export retrieved data
in the specified data retrieval area to
a file.
Valid values for ai_exporttype are:
0 - Microsoft Excel format
1 - Tab separated text
2 - Comma separated text
3 - Microsoft Multiplan format
4 - Lotus 1 2 3
5 - Lotus 1 2 3
6 - Data Interchange format
7 - dBASE-II
8 - dBASE-III
9 - SQL Insert statements
10 - Tab separated text saved to clipboard instead of a file (as_filename can be empty string "")
11 - Powersoft Report format
12 - Windows Metafile format
13 - HTML table
14 - Excel 5
15 - XML
16 - XSL
17 - PDF
18 - Excel 8
19 - Enhanced Metafile format
24 - Excel XLSX format
25 - Excel XLSB format
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_exportdata(1,13,1,"c:\powerhome\dra1.htm") -
Exports the data in data retrieval area 1 as an HTML table and saves the data to
file c:\powerhome\dra1.htm