Foxtable(狐表)用户栏目专家坐堂 → 导入EXCEL数据问题


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

主题:导入EXCEL数据问题

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/5/11 19:35:00 [显示全部帖子]

1、放在哪里都可以;

 

2、可以

 

Dim dlg As New OpenFileDialog
dlg.MultiSelect = True
If dlg.ShowDialog = DialogResult.OK Then
    For Each fl As String In dlg.FileNames
        Dim book As new XLS.Book(fl)
        For Each sheet As XLS.Sheet In book.Sheets
            Dim ip As New Importer
            ip.SourcePath = fl
            ip.Format = "excel"
            ip.SourceTableName = sheet.Name & "$"
            Dim fn As String = FileSys.GetName(fl)
            ip.NewTableName = fn.SubString(0, fn.IndexOf("."))
            ip.Import()
        Next
    Next
End If

 

3、不能沿用excel的格式;

 

4、DataTable


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/5/11 20:05:00 [显示全部帖子]

Dim dlg As New OpenFileDialog
dlg.MultiSelect = True
If dlg.ShowDialog = DialogResult.OK Then
    For Each fl As String In dlg.FileNames
        Dim book As new XLS.Book(fl)
        For Each sheet As XLS.Sheet In book.Sheets
            Dim ip As New Importer
            ip.SourcePath = fl
            ip.Format = "excel"
            ip.SourceTableName = sheet.Name & "$"
            ip.NewTableName = sheet.Name
            ip.Import()
        Next
    Next
End If

 回到顶部