spreadsheetgear

Get the number of rows of data with SpreadSheetGear?

醉酒当歌 提交于 2019-12-01 14:57:39
问题 I've checked a few online resources, maybe I'm blind but I've as yet been unable to find an answer to this. I'm uploading a file, converting it to a stream, feeding it into SpreadSheetGear. Now, I need to loop through every row and read the data (which is fine). Here is my code so far: IWorkbook wb = Factory.GetWorkbookSet().Workbooks.OpenFromStream(file.InputStream); IWorksheet ws = wb.ActiveWorksheet; IRange cells = ws.Cells; for (int i = 2; i <= cells.RowCount; i++) { //Code for every row