uhrb / excellibrary

Automatically exported from code.google.com/p/excellibrary
0 stars 0 forks source link

Getting Error on files that are larger than 15,467,008 bytes #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two excel 97-2000 documents (xls). Doesn't matter the amount of 
cells, rows, or columns. The first file must not be greater than 15,467,008 
bytes. The second file can contain one cell more to push the file size past 
15,467,008 bytes.
2. I created new tests to test pulling these files into Workbook.Load(). I am 
passing a file stream in to the .Load(stream) method.

What is the expected output? Both files were expected to load into the Workbook 
object properly and allow me to iterate over the rows and columns to test each 
cells value.

What do you see instead? The file that is exactly 15,467,008 bytes loads 
properly and allows me to iterate over the rows and columns to test the values. 
The file that is over 15,467,008 bytes fails to load with the following error: 

System.ArgumentOutOfRangeException : Specified argument was out of the range of 
valid values.
Parameter name: sectorID
   at ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetNextSectorID(Int32 sectorID) in SectorAllocation.cs: line 45
   at ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetSIDChain(Int32 StartSID) in SectorAllocation.cs: line 59
   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.GetStreamDataAsBytes(Int32 StartSID) in CompoundDocument_Read.cs: line 153
   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntries() in CompoundDocument_Read.cs: line 82
   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(Stream stream) in CompoundDocument.cs: line 90
   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Load(Stream stream) in CompoundDocument_Read.cs: line 21
   at ExcelLibrary.SpreadSheet.Workbook.Load(Stream stream) in Workbook.cs: line 36
   at ExcelLibrary.Test.LargeFileTests.TestFilePassed(String fileName) in LargeFileTests.cs: line 41
   at ExcelLibrary.Test.LargeFileTests.TestLargeRowCountFilesWithFileContaining65536Rows() in LargeFileTests.cs: line 91

What version of the product are you using? Latest version.

On what operating system? Windows 7 - 64bit

Please provide any additional information below.

Original issue reported on code.google.com by tnederv...@gmail.com on 19 Mar 2013 at 9:39

GoogleCodeExporter commented 9 years ago
It actually doesn't matter the number of worksheets in the workbook either as 
long as the file size doesn't go passed 15,467,008 bytes. 

Original comment by tnederv...@gmail.com on 19 Mar 2013 at 9:44

GoogleCodeExporter commented 9 years ago
Hi Guys 
getting same error

Error on : 5/1/2015 5:23:30 PM - System.Collections.ListDictionaryInternal 
ExcelLibrary Specified argument was out of the range of valid values.

Parameter name: sectorID    at 
ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetNextSectorID(Int32 
sectorID)

   at ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetSIDChain(Int32 StartSID)

   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.GetStreamDataAsBytes(Int32 StartSID, Int32 length)

   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.GetStreamData(DirectoryEntry entry)

   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadAllStreamData()

   at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Load(Stream stream)

   at ExcelLibrary.SpreadSheet.Workbook.Load(Stream stream)

   at ExcelLibrary.SpreadSheet.Workbook.Load(String file)

Original comment by devale...@powerepc.com on 1 May 2015 at 12:23

GoogleCodeExporter commented 9 years ago
Please suggest me any solution for this

Original comment by devale...@powerepc.com on 1 May 2015 at 12:23