NPOI - Get excel row count to check if it is empty
问题 I'm reading an xlsx file using NPOI lib, with C# . I need to extract some of the excel columns and save the extracted values into some kind of data structure. I can successfully read the file and get all the values from the 2nd (the first one contains only headers) to the last row with the following code: ... workbook = new XSSFWorkbook(fs); sheet = (XSSFSheet)workbook.GetSheetAt(0); .... int rowIndex = 1; //--- SKIP FIRST ROW (index == 0) AS IT CONTAINS TEXT HEADERS while (sheet.GetRow