I've read a lot of where people have missing cell data due to null values but my issue is I have spreadsheets I'm parsing that have exactly 272 rows of data needing to be parsed. When I get the row count I'm only able to retrieve 269. Below is how I'm getting the row count.
// code above gets worksheet...
var rows = from row in worksheet.Descendants<Row>()
where row.RowIndex >= rowIndex
select row;
for (int i = 0; i <= rows.Count(); i++)
{
// processing...
}
The rowIndex above is used because I'm only pulling 272 rows after a few heading rows and it needs to be dynamic as some sheets have multiple heading rows. Basically I search for a particular cell value for a string and then from there get the rowIndex and use that to get the row count.
I've tracked down the two rows not being picked up and do not have values in them, but there are other rows exactly the same that do not have values and the rows are included. It is important as all sheets I need to parse have 272 rows of specific data with blank rows in the same spot. One sheet will work fine and include the rows while another won't.
So I'm trying to determine why some blank rows are included but others are totally ignored like they do not exist.
Any help would be appreciated.