report_exportXls()

Read(2849) Label: export, xls, xlsx,

Description:

Export a report as an xls file or an xlsx file.

Syntax:

report_exportXls(rpt, filePath)

Note:

By default, this external library function (See External Library Guide) exports a report as an xls file. A report file that isn’t computed will be exported as a template.

Parameter:

rpt

A report object

filePath

The exported file path, which is either a relative path or an absolute path; for a relative path, its base directory is the content of <home> in the configuration file.

Option:

@x

Export the report as an xlsx file

Return value:

An exported file path

Example:

 

A

 

1

>report_config("config\\raqsoftConfig.xml")

 

2

=report_open("D:\\test.rpx")

 

3

=report_run(A2)

 

4

=report_exportXls(A2,"D: \\test.xls")

Export as test.xls

5

=report_exportXls@x(A2,"D:\\test.xlsx")

Export as test.xlsx

6

=report_exportXls(A2,"test.xls")

With a relative path parameter, the exported file path is D:\test.xls if the path set for <home> in the configuration file is “D:\”

Related function:

report_config()

report_open()

report_run()