Quantcast
Channel: Excel Data Reader - Read Excel files in .NET
Viewing all articles
Browse latest Browse all 448

Created Unassigned: binary reader not returning all rows [12834]

$
0
0
Empty rows (with no cell) can lead to erroneous end of sheet detection.
Patch : ExcelBinaryReader.cs
Method : moveToNextRecordNoIndex()

Old code :
```
if (record.IsCell)
{
var candidateCell = record as XlsBiffBlankCell;
if (candidateCell != null)
{
if (candidateCell.RowIndex == m_currentRowRecord.RowIndex)
cell = candidateCell;
}
}

```

Patched code :

```
if (record.IsCell)
{
var candidateCell = record as XlsBiffBlankCell;
if (candidateCell != null)
{
// if (candidateCell.RowIndex == m_currentRowRecord.RowIndex) // [jerome.raffalli]
// in case of empty row no cell exists for this row, so we have to exit [jerome.raffalli]
if (candidateCell.RowIndex __>=__ m_currentRowRecord.RowIndex)
cell = candidateCell;
}
}

```

Jérôme

Viewing all articles
Browse latest Browse all 448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>