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

Commented Unassigned: IndexOutOfRangeException - array for cell values too small [11881]

$
0
0
I think the following line in method ExcelBinaryReader.readWorkSheetRow() is wrong:
```
m_cellsValues = new object[m_maxCol];
```
Reason:
m_maxCol holds the index of the last column, not the column count. We get a "one-off" here. Just fix the line like so:
```
m_cellsValues = new object[m_maxCol+1];
```
Comments: ** Comment from web user: specialist_ **

I have IndexOutOfRangeException when I import excel files in old format
[details](http://dev-doc.blogspot.com/2015/02/c-exceldatareader-indexoutofrangeexcept.html)


Viewing all articles
Browse latest Browse all 448

Trending Articles



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