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


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

主题:导入

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


加好友 发短信
等级:六尾狐 帖子:1470 积分:8981 威望:0 精华:0 注册:2013/10/24 9:12:00
导入  发帖心情 Post By:2015/3/13 11:01:00 [显示全部帖子]

收购20150101,收购20150102,......,收购20150131,如一月份共31张收购单,每张收购单名都是“收购+日期”,都保存在文件收购201501内,如果想汇总5日到10日,应如何修改下面代码?
Dim c As Date = vars("uservdate")
Dim y As Integer = c.year
Dim m As Integer = c.month
Dim d As Integer = c.day
Dim c1 As Date = vars("userddate")
Dim y1 As Integer = c.year
Dim m1 As Integer = c.month
Dim d1 As Integer = c.day
DataTables("收购").DataRows.Clear
For Each file As String In filesys .GetFiles(ProjectPath & "收购" & y)
    If file.EndsWith(".xls") OrElse file.EndsWith(".xlsx") Then
        Dim Book1 As New XLS.Book(file)
        Dim Sheet1 As XLS.Sheet = Book1.Sheets("收购")
        Dim dr As DataRow = DataTables("收购").AddNew
        Dim t As Integer
        t = 0
        For n As Integer = 5 To 54
            Dim r As Row = Tables("收购").AddNew()
            t = t + 1
            r("行次") = t
            r("年未数") = Sheet1(n,3).Value
            r("日期") = Sheet1(1,0).Value
        Next
        DataTables("收购").DeleteFor("[行次] is null")
    End If
Next

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


加好友 发短信
等级:六尾狐 帖子:1470 积分:8981 威望:0 精华:0 注册:2013/10/24 9:12:00
  发帖心情 Post By:2015/3/13 11:23:00 [显示全部帖子]

又学多一样,多谢!

 回到顶部