Foxtable(狐表)用户栏目专家坐堂 → [原创]


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

主题:[原创]

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


加好友 发短信
等级:婴狐 帖子:3 积分:402 威望:0 精华:0 注册:2020/3/5 13:26:00
[原创]  发帖心情 Post By:2022/12/2 9:25:00 [显示全部帖子]

                Dim tb As Table = Tables("yuangongxiaoshou")
                Dim dtb As DataTable = DataTables("yuangongxiaoshou")
                Dim kairow As Integer = riqizhi
                Dim dtrows As List(Of DataRow)
                dtrows = DataTables("yuangongxiaoshou").Select("riqi>=" & kairow)
                If dtrows.Count > 0 Then
                    For Each dtrw As DataRow In dtrows
                        dtrw.Delete
                    Next
                End If
                '导入数据
                Dim filname As String = "C:\Users\Administrator\Desktop\" & dizhi
                Dim App As New MSExcel.Application
                Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(filname)
                Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
                Dim Rgs As MSExcel.Range = Ws.UsedRange
                Dim hang As Integer = Rgs.Rows.Count
                Wb.Save
                Wb.Close
                App.Quit
                Dim _execl As New ExOpenXml.ExOXExecl()
                _execl.Open(filname, True)'打开
                _execl.AppendToDataTable(DataTables("yuangongxiaoshou").Basetable, , ,0, hang - 1)
                _execl.Dispose()
                tb.ResumeRedraw
                DataTables("yuangongxiaoshou").save()

导入Excel不成功,是哪里的问题


 回到顶部