以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  目的自定义地址与文件名,导出去掉双引号,不知道哪里出错了,谢谢  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=86289)

--  作者:limit_1982
--  发布时间:2016/6/14 23:21:00
--  目的自定义地址与文件名,导出去掉双引号,不知道哪里出错了,谢谢
Dim dlg As New SaveFileDialog
dlg.Filter= "TXT文件|*.txt" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then
Dim ex As New Exporter
ex.SourceTableName = "表A"
ex.Header= False
Dim a As String =ProjectPath
ex.FilePath =a
ex.NewTableName =dlg.FileName 
ex.Format ="Delimited"
ex.Export()
End If
Dim s As String =dlg.FileName
Dim str As String = FileSys.ReadAllText(ProjectPath & s & ".txt", Encoding.Default)
str = str.replace("""", "")
FileSys.WriteAllText(ProjectPath & s & ".txt", str, False, Encoding.Default)

--  作者:大红袍
--  发布时间:2016/6/15 0:05:00
--  
Dim dlg As New SaveFileDialog
dlg.Filter= "TXT文件|*.txt" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then
    Dim ex As New Exporter
    ex.SourceTableName = "表A"
    ex.Header= False
    ex.FilePath = FileSys.GetParentPath(dlg.FileName)
    ex.NewTableName = FileSys.GetName(dlg.FileName.replace(".txt", "")
    ex.Format ="Delimited"
    ex.Export()
    Dim str As String = FileSys.ReadAllText(dlg.FileName, Encoding.Default)
    str = str.replace("""", "")
    FileSys.WriteAllText(dlg.FileName, str, False, Encoding.Default)
End If