0
有沒有辦法在excel工作表中獲取最大數量的用戶填充單元格,而不需要通過一個範圍或每個excel電子表格迭代最大單元格?使用vb.net獲取最大單元格填充數
現在我有
Imports Excel = Microsoft.Office.Interop.Excel
Private Sub DoStuff()
Dim oApp As New Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
oWB = oApp.Workbooks.Open(txtExcel.Text)
oSheet = CType(oWB.ActiveSheet, Excel.Worksheet)
For Each iCount As Integer in oSheet.Cells.Rows.Count
'get cell text for every row in a specific column'
dim sCellText as string = oSheet.Cells(iCount, 1).toString
'do stuff'
Next
End Sub
眼下oSheet.Cells.Rows.Count = 1048576和尋找通過片材有小於1000行數據。