Code Monkey home page Code Monkey logo

Comments (19)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
I have the same problem, I am unable to open large files. (although in my case 
"large" is actually around 10mb). The spreadsheets I am working with are quite 
complex though.

Original comment by [email protected] on 29 Apr 2009 at 8:47

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Here's a stacktrace when opening a large file (around 17mb)

The sectorID value was -3..

"Specified argument was out of the range of valid values.\r\nParameter name: 
sectorID"}  System.Exception {System.ArgumentOutOfRangeException}

>   
ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetNextSec
torID
(int sectorID = -3) Line 45 C#

ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetSIDChai
n(int 
StartSID = 37508) Line 59 + 0xe bytes   C#

ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.CompoundDocument.GetStreamD
ataAs
Bytes(int StartSID = 37508) Line 153 + 0x25 bytes   C#

ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirect
oryEn
tries() Line 82 + 0x29 bytes    C#

ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(Syste
m.IO.
Stream stream = {System.IO.FileStream}) Line 81 + 0x12 bytes    C#

ExcelLibrary.dll!ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(strin
g 
file = "C:\\Users\\Public\\Documents\\PublicContactsTotal\\PublicContactsTotal 
- 
Copy.xls") Line 61 + 0xa bytes  C#

ExcelLibrary.WinForm.exe!ExcelLibrary.WinForm.Form1.openOToolStripMenuItem_Click
(obje
ct sender = {Open(&O)}, System.EventArgs e = {System.EventArgs}) Line 61 + 0x11 
bytes   
C#

Original comment by [email protected] on 13 May 2009 at 7:00

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Yes, SectorID is -3 because it has type "int", but it should be uint or long.

Original comment by [email protected] on 13 May 2009 at 7:07

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Did you make this change in your local version? on which places. Can you send a 
patch?

Original comment by [email protected] on 13 May 2009 at 7:11

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
No yet. I have plan to do it if authors can't do it but some time later.

Original comment by [email protected] on 13 May 2009 at 7:14

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
It seems the authors are not responding. You're mentioning that we should use 
uint or 
long instead of int.. Changing the type of the parameter results in many other 
int-
>uint/long changes. Is that the way to go? Just change all the parameters that 
are 
depended into uint or long.. And should we choose uint or long?

Original comment by [email protected] on 16 May 2009 at 9:08

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Any news on this issue?

Original comment by [email protected] on 2 Jun 2009 at 12:06

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
From what I can tell, more than 109 SecIDs triggers problems when reading the 
MSAT 
in large files (> 7MB?).  Negative SecIDs have special meaning.

The following patch fixes my issues.

Original comment by [email protected] on 3 Jun 2009 at 8:54

Attachments:

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
After applying the patch from comment 8 by vromero i still get the negative 
sectorid 
when loading large files (>12mb)

Original comment by [email protected] on 4 Jun 2009 at 2:57

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
For future reference anyone reading this:

I had the same issue using the compiled DLL writing to a file with approx 
290000 rows by 43 columns. I changed all the int's to int32's and rebuilt the 
project, this appeared to fix the problem. However now I just need to get 
around the OutOfMemory exceptions thrown after it hits 1.3GB on my 2gb machine. 
I'm guessing the code needs to save to disc once the buffer hits a certain 
size, although I've not looked into it.

Original comment by [email protected] on 6 Mar 2011 at 2:23

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Hi !
"Jay.Ze..." : can you send me your source code ? I would like to test it for my 
software XL2Csv. This would be a good idea to Upload your fix into the main 
project for ExcelLibrary : there is no new download since 2009 !
Thanks, Patrice.
[email protected]

Original comment by [email protected] on 28 Mar 2011 at 9:40

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Hello, it is a very nice software I have been around looking for some 
alternative to read Excel file without Interop nor OleDB and I could not find 
it.

It is a shame that it does not work very good with large files.

Jay.Ze, I tried to do what you said but I am not able to get the complete 
program working, Can you please tell me more details of how you solved the 
problem?

It would be also nice to have the project as Patrice said.

Thanks,

Original comment by [email protected] on 3 Aug 2011 at 1:10

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Hello.
Did anybody solved this problem?
I neew excellib for fast reading of big xls file only. Can anybody send me old 
version with his own fixes of this problem?

Original comment by [email protected] on 27 Mar 2012 at 3:31

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Hello , did anyone solved this problem ? ,pls help me solve this problem !

Original comment by [email protected] on 18 Feb 2013 at 11:06

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
System.ArgumentOutOfRangeException was unhandled
  Message=Specified argument was out of the range of valid values.
Parameter name: sectorID
  Source=ExcelLibrary
  ParamName=sectorID
  StackTrace:
       at ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetNextSectorID(Int32 sectorID)
       at ExcelLibrary.CompoundDocumentFormat.SectorAllocation.GetSIDChain(Int32 StartSID)
       at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.GetStreamDataAsBytes(Int32 StartSID)
       at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntries()
       at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(Stream stream)
       at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Load(Stream stream)
       at ExcelLibrary.SpreadSheet.Workbook.Load(Stream stream)
       at ExcelLibrary.SpreadSheet.Workbook.Load(String file)

Original comment by [email protected] on 18 Feb 2013 at 11:12

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
to [email protected]
yes , i had the same problem , did u solved ? 

Original comment by [email protected] on 19 Feb 2013 at 1:13

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Hi
I had this issue with an Excel 2003 file over 16mb.
In the code there is a bug which, after wading through the MS Compound Binary 
File documention,  I found and fixed below. 
Its in the Read of the DIFAT sectors (which the authors of this refer to as the
MasterSectorAllocTable); the read only comes into play with files over 6.8 MB)
Basically they load a bogus FAT idx into the list of FAT (SATs)Indexes.
(Its actually a link to the next DIFAT sector rather than a FAT sector)
My inelegant code which adjusts the SelectSIDs method is below
*****
        private void InitializeMasterSectorAllocationTable()
        {
            this.MasterSectorAllocationTable = new List<int>(NumberOfSecIDs);
            SelectSIDs(Document.Header.MasterSectorAllocationTable,0);
            int msid = Document.Header.FirstSectorIDofMasterSectorAllocationTable;
            while (msid != SID.EOC) 
            {
                CurrentMSATSector = msid;
                int[] SIDs = Document.ReadSectorDataAsIntegers(msid);
                SelectSIDs(SIDs,1);
                msid = SIDs[SIDs.Length - 1];
            }
        }

        private void SelectSIDs(int[] SIDs,int reduce_)
        {
            for (int i = 0; i < (SIDs.Length - reduce_); i++)
            {
                int sid = SIDs[i];
                if (MasterSectorAllocationTable.Count < NumberOfSecIDs)
                {
                    MasterSectorAllocationTable.Add(sid);
                }
                else
                {
                    break;
                }
            }
        }
Hope it works for folks - no guarantee its the same Sector issue as those above.

Original comment by [email protected] on 27 Oct 2014 at 9:16

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Thanks for the tip [email protected]

It works fine :)

Original comment by [email protected] on 26 Jan 2015 at 5:46

from excellibrary.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
For those who don't have the means for re-building the dll themselves, I've 
created a new one using [email protected]'s code. It seems to work just 
fine!

Original comment by [email protected] on 15 Apr 2015 at 2:20

Attachments:

from excellibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.