以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何自设导出路径  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=6005)

--  作者:狐哥
--  发布时间:2010/2/25 15:49:00
--  如何自设导出路径

请教各位老师:

Dim
ex as New Exporter
ex
.SourceTableName = "订单"
ex
.FilePath = "c:\\Data\\订单.xls" \'指定目标文件 ---如何用 SaveFileDialog 来自定义路径和文件名??
ex.Format = "Excel"
ex.Fields = "日期,客户,数量,单价"
ex.Filter = "[产品] = \'PD01\'"
ex.Export()


--  作者:czy
--  发布时间:2010/2/25 16:52:00
--  
Dim f as New SaveFileDialog
f.Filter = "Excel文件|*.Xls"
If f.ShowDialog = DialogResult.Ok Then
    Dim ex as New Exporter
    ex.SourceTableName = "订单"
    ex.FilePath = f.FileName
    ex.Format = "Excel"
    ex.Fields = "日期,客户,数量,单价"
    ex.Filter = "[产品] = \'PD01\'"
    ex.Export()
End If

--  作者:狐哥
--  发布时间:2010/2/26 9:45:00
--  
万分感谢!