-- 作者:大红袍
-- 发布时间:2016/4/7 16:10:00
--
Dim Book As New XLS.Book("d:\\test.xls") Dim Sheet As XLS.Sheet = Book.Sheets(0)
Dim nms() As String = {"第一列", "第二列"}
For n As Integer = 3 To Sheet.Rows.Count-1 For c As Integer = 0 To sheet.Cols.count-1 Step 2 If Sheet(n,c).Text > "" Then Dim r As Row = Tables("表A").AddNew() For m As Integer = 0 To nms.Length - 1 r(nms(m)) = Sheet(n,c+m).Value Next End If Next Next
|