比如
Dim App As New MSExcel.ApplicationDim Wb As MSExcel.WorkBook = App.WorkBooks.Open("d:\test.xls")Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)Dim r = ws.cells(65536,2).End(MsExcel.XlDirection.xlUp).Rowmsgbox(r)
App.quit