Foxtable(狐表)用户栏目专家坐堂 → 导出


  共有1245人关注过本帖树形打印复制链接

主题:导出

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/12 19:35:00 [显示全部帖子]

试试这样

 

Dim dlg As New FolderBrowserDialog
If dlg.ShowDialog = DialogResult.Ok Then
    For Each c As String In DataTables("学生信息").GetValues("班级")
        Dim ex As new Exporter
        ex.SourceTableName = "学生信息"
        ex.FilePath = dlg.SelectedPath & "\" & c & "\基本信息核对表.xlsx"
        ex.Format = "Excel2007"
        ex.Fields ="班级,学生姓名,身份证件号"
        ex.filter = "班级 = '" & c & "'"
        If filesys.fileexists(ex.filepath) Then
            filesys.deletefile(ex.filepath)
        End If
        ex.Export()
    Next
End If


 回到顶部