datastore保存为excel问题?(50)

needuxp 2003-06-06 11:31:54
需要保存datastore中的数据到excel文件,用语句
ds_1.saveas('', excel!, true)
弹不出保存excel的窗口,如果我指定一个文件名字是可以保存成功的,就是说这样写:ds_1.saveas('f:/1.xls', excel!, true)
,但是我现在想让用户自己选择路径,该怎么写哪?
...全文
47 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dingyy 2003-06-06
  • 打赏
  • 举报
回复
up
Thinkinger 2003-06-06
  • 打赏
  • 举报
回复
同意楼上
boyliulang 2003-06-06
  • 打赏
  • 举报
回复
li_value = GetFileSaveName("Select File",ls_docname, ls_named, "xls", + &
"Excel Files (*.xls),*.xls," + " Excel Files (*.xls), *.xls")

if li_value = 1 then
lb_exist = FileExists(ls_docname)
IF lb_exist THEN
li_ret = MessageBox("提示",ls_named+"文件已经存在,是否覆盖?", Question!, YesNo!)
end if
这样可以得到路径。具体你可以参考pb帮助GetFileSaveName,

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧