Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Issue: Error 'Cannot remove block[ 390 ]; out of range[ 0 - 389 ]' on reading files with many rows [9544]

$
0
0
There is an error on reading files with rows about 1500-3000 (depends on columns count):
 
ERROR info:
 
System.IO.IOException was unhandled by user code
Message=Cannot remove block[ 390 ]; out of range[ 0 - 389 ]
Source=NPOI
StackTrace:
в NPOI.POIFS.Storage.BlockListImpl.Remove(Int32 index)
в NPOI.POIFS.Storage.BlockAllocationTableReader.FetchBlocks(Int32 startBlock, Int32 headerPropertiesStartBlock, BlockList blockList)
в NPOI.POIFS.Storage.BlockListImpl.FetchBlocks(Int32 startBlock, Int32 headerPropertiesStartBlock)
в NPOI.POIFS.Properties.PropertyTable..ctor(Int32 startBlock, RawDataBlockList blockList)
в NPOI.POIFS.FileSystem.POIFSFileSystem..ctor(Stream stream)
в NPOI.HSSF.UserModel.HSSFWorkbook..ctor(Stream s, Boolean preserveNodes)
в NPOI.HSSF.UserModel.HSSFWorkbook..ctor(Stream s)
... (my code)
InnerException:
 
 
Reproduced on versions:
1.2.3
1.2.4 alpha
 
code:
using (var stream = File.OpenRead(filePath))
{
using (var workbook = new HSSFWorkbook(stream)) // ERROR appears here
{
Comments: ** Comment from web user: ChinmayKMawar **

I'm having the same problem

Cannot remove block[ 7274578 ]; out of range[ 0 - 43 ]

at the line

Dim wkbk As HSSFWorkbook = New HSSFWorkbook(fsread)

using NPOI 1.2.5

Any solutions??


Viewing all articles
Browse latest Browse all 1621

Trending Articles



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