pb 导出 html,PB导出数据excel格式dw2xls

PB导出数据excel格式dw2xls

使用DW2XLS控件

语法

uf_save_dw_as_excel ( dw, filename )

參数

dw A reference to the datawindow object

filename A string whose value is the name of the file you want to create. If filename is not on the operating system‘s search path, you must enter the fully qualified name.

返回值

Integer. Returns 1 if it succeeds and -1 if an error occurs.

举例

integer li_ret

li_ret = uf_save_dw_as_excel(dw_1, ‘c:\doc\report.xls‘)

if li_ret = 1 then

//success

//...

else

//fail

//...

end if

我的实际样例

首先 migrate dw2XLS

da46c413c542b73b1b6e78e1cd684c75.png

界面

42a7d7c9a85e214f0465ea85e31c5d0c.png

相关代码

05c41922778d99f24450a13df1a54082.png

导出结果

b411ca26bd9e0d03cb09ccbfdb5e152e.png

还有相关的就是

uf_save_dw_as_excel_parm() function

Converts datawindow into excel file. Allows to specify some options for process of converting.

语法

uf_save_dw_as_excel_parm ( dw, filename, parm )

參数

dw A reference to the datawindow object

filename A string whose value is the name of the file you want to create. If filename is not on the operating system‘s search path, you must enter the fully qualified name

parm A reference to the n_dwr_service_parm object which contain a set of parameters for process of converting

返回值

Integer. Returns 1 if it succeeds and -1 if an error occurs.

举例

//export using parameters

integer li_ret

n_dwr_service_parm lnvo_parm

lnvo_parm = create n_dwr_service_parm

lnvo_parm.ib_header = false //skip header band 没有标题行

lnvo_parm.ib_summary = false //skip summary band

lnvo_parm.ib_footer = false //skip footer band

lnvo_parm.ib_group_header = false //skip all group headers

lnvo_parm.ib_group_trailer = false //skip all group trailers

li_ret = uf_save_dw_as_excel_parm(dw_1, ‘c:\doc\report.xls‘, lnvo_parm)

if li_ret = 1 then

//success

//...

else

//fail

//...

end if

以下这个没有測试成功,可能版本号不正确

is_header_text 没有这种方法

// adding a header to generated XLS

integer li_ret

n_dwr_service_parm lnvo_parm

lnvo_parm = create n_dwr_service_parm

lnvo_parm.is_header_text = "Report"

lnvo_parm.ib_header_font_underline = True

li_ret = uf_save_dw_as_excel_parm(dw_1, ‘c:\doc\report.xls‘, lnvo_parm)

if li_ret = 1 then

//success

//...

else

//fail

//...

end if

  • 0
    点赞
  • 0
    收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:1024 设计师:我叫白小胖 返回首页
评论
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值