reportlite_export ()

阅读(1245) 标签: 导出, pdf, docx, xlsx, xls, html, mht, rptr,

描述:

导出轻装版报表/报表组文件。

语法:

reportlite_export(rpt, filePath)

备注:

外部库函数,外部库的使用请参考润乾报表轻装版《用户参考》。

可将报表导出为pdfdocxxlsxxlshtmlmhtrptr文件。缺省导出rptr文件。

导出报表组文件时,仅支持@p@d@x@h选项。

参数:

rpt

ReportObject对象

filePath

导出文件路径,可以是绝对路径也可以是相对路径。相对路径时,基准目录为配置文件中<home>节点配置的路径。

选项:

@p

导出pdf文件,默认分页。

@d

导出docx文件。

@x

导出xlsx文件,默认分页。

@h

导出html文件。

@n

导出不分页的文件,需结合@p@x一起使用。

@s

导出xls文件,需结合@x一起使用。

@m

导出mht文件,需结合@h一起使用。

@f

导出带公式的Excel文件,需结合@x@xs一起使用。

返回值:

文件导出路径

示例:

 

A

 

1

>reportlite_config("config\\raqsoftConfigReportLite.xml")

 

2

=reportlite_open("D:\\test.rptx")

 

3

=reportlite_run(A2)

 

4

=reportlite_export@d(A2,"D:\\test.docx")

导出test.docx文件。

5

=reportlite_export@d(A2,"D:\\test")

同上,不写文件后缀时,可自动生成。

6

=reportlite_export@p(A2,"D:\\test")

导出分页的test.pdf文件。

7

=reportlite_export@xn(A2,"D:\\test")

导出不分页的test.xlsx文件。

8

=reportlite_export@xsf(A2,"D:\\test")

导出带公式的test.xls文件。

9

=reportlite_export@hm(A2,"D:\\test")

导出test.mht文件。

10

=reportlite_export(A2,"D:\\test")

导出test.rptr文件。

11

=reportlite_export@pdxh(A2,"D:\\test")

导出分页的test.pdf文件,优先级@p>@d>@x>@h

相关概念:

reportlite_config()

reportlite_open()

reportlite_run()