以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 导入 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=65296) |
-- 作者:发财 -- 发布时间: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 |
-- 作者:有点甜 -- 发布时间:2015/3/13 11:05:00 -- Dim flag As Boolean = False If flag Then End If |
-- 作者:发财 -- 发布时间:2015/3/13 11:23:00 -- 又学多一样,多谢! |