收购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