PowerBuilder数据窗口保存为Excel表
2006-02-09 07:24
579 查看
数据窗口保存为EXCEL的好办法
_________________________________________________________________________________
能保存几乎所有内容
// ... Init docname
// ... GetFileOpenName or any other method
if dw_export.SaveAs(docname, HTMLTable!, True) = -1 then
MessageBox("警告!", "无法输出数据.文件写入错误!",Exclamation!)
return
end if
// Convert HTML file to Excel native format
OLEObject excel
excel = CREATE OLEObject
if excel.ConnectToObject(docname) = 0 then
excel.application.DisplayAlerts = FALSE
excel.application.workbooks(1).Parent.Windows(excel.application.workbooks(1).Name).Visible = True
excel.application.workbooks(1).saveas(docname, 39)
excel.application.workbooks(1).close()
end if
DESTROY excel
// done
_________________________________________________________________________________
能保存几乎所有内容
// ... Init docname
// ... GetFileOpenName or any other method
if dw_export.SaveAs(docname, HTMLTable!, True) = -1 then
MessageBox("警告!", "无法输出数据.文件写入错误!",Exclamation!)
return
end if
// Convert HTML file to Excel native format
OLEObject excel
excel = CREATE OLEObject
if excel.ConnectToObject(docname) = 0 then
excel.application.DisplayAlerts = FALSE
excel.application.workbooks(1).Parent.Windows(excel.application.workbooks(1).Name).Visible = True
excel.application.workbooks(1).saveas(docname, 39)
excel.application.workbooks(1).close()
end if
DESTROY excel
// done
相关文章推荐
- PowerBuilder 编辑数据窗口后保存 引起 PB程序崩溃
- 图学PowerBuilder----Datawindow保存数据功能
- 我用showmodaldialog打开窗口,编辑数据保存后,但虽然数据库里的数据更新了,第二次再showmodaldialog打开窗口时数据并不是更新的状态:
- 数据窗口保存拖动位置后的列顺序
- PowerBuilder:表中字段的数据长度的修改对数据窗口的影响
- powerbuilder 中怎么改变数据窗口的可编辑属性
- PB Grid风格的数据窗口怎么保存用户使用时设定的列的宽度、列的位置等信息
- PowerBuilder数据窗口编程技巧十则
- PowerBuilder数据窗口编程技巧十则
- PowerBuilder 数据窗口实例一(用户注册)
- PB 利用timer()函数实现定时将数据窗口以excel文档保存至指定地方
- PowerBuilder创建动态数据窗口
- 数据窗口只保存编辑不保存删行
- PB里协调多数据窗口数据操纵的一种方法(即多Tab标签可同时保存)
- 如何编写一个能读取Powerbuilder的数据窗口中数据的程序
- 将MSHFlexGrid中的数据保存到Excel表
- PowerBuilder 数据窗口实例一(用户注册)
- 关闭窗口时保存数据的办法
- Disable Saving Page 取消弹出你有数据没有保存的窗口
- 新打开窗口,MD5加密,实体类方式保存在Session中,获得系统根路径,分页,动态获取XML数据到页面