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行数据。