这样就可以导入Excel工作簿中的第一个表了:
Dim Book As New XLS.Book(ProjectPath & "Attachments\客户.xls") Dim Sheet As XLS.Sheet = Book.Sheets(0)Dim ip As New Importerip.SourcePath = ProjectPath & "Attachments\客户.xls" ip.SourceTableName = Sheet.name ip.NewTableName = Sheet.name
ip.Format = "Excel" ip.Import()