代码如下(借鉴了论坛狐友的代码),
Dim r As Row
Dim Book As New XLS.Book(e.Form.Controls("TextBox11").value)
Dim Sheet As XLS.Sheet = Book.Sheets(e.sender.value)
For i = 0 To Sheet.Cols.count – 1
r = t.AddNew()
r("名称")= Sheet(0,i).Value
此处需要排除列名为空的列
Next