老师,新年好!
下面的导入代码只能选择固定名称和固定路径的文件,我想增加一个对话框,用来实现可以选择要导入的文件,请问如何修改?谢谢!(帮助文件中只能选择导入一个工作表,我的“二期融资”工作簿中有上百个工作表)
Dim Book As New XLS.Book("C:\Users\1234\Desktop\二期融资.XLS")
Tables("收款明细表").StopRedraw()
For i As Integer = 0 To Book.Sheets.Count -1
Dim Sheet As XLS.Sheet = Book.Sheets(i)
Dim nms() As String = {"债权人","借款日期","借款年限","利率","收取金额","收据号码","凭证号码","备注"}
For n As Integer = 1 To Sheet.Rows.Count -1
Dim r As Row = Tables("收款明细表").AddNew()
For m As Integer = 0 To nms.Length - 1
r(nms(m)) = Sheet(n,m).Value
Next
Next
Next
Tables("收款明细表").ResumeRedraw()