Error opening XLS from Stream

I can''t seem to open the attached file from a stream I get an error "Can''t open storage on LockBytes."; The code I''m using looks like: Stream fileStream = File.OpenRead(fileName); XLS.ExcelUtils.ThrowNotSavedOnDestroy = false; fileStream.Seek(0, SeekOrigin.Begin); XLS.IWorkbook excelBook = XLS.ExcelUtils.Open(fileStream); //error Any help would be appreciated thanks. My xls file is attached. I don''t have this problem with all excel files, I''m trying to figure out what''s special about this one.

4 Replies

BR Brian Richards April 10, 2006 09:35 PM UTC

XLS is attached. >I can''t seem to open the attached file from a stream I get an error "Can''t open storage on LockBytes."; > >The code I''m using looks like: > >Stream fileStream = File.OpenRead(fileName); >XLS.ExcelUtils.ThrowNotSavedOnDestroy = false; >fileStream.Seek(0, SeekOrigin.Begin); >XLS.IWorkbook excelBook = XLS.ExcelUtils.Open(fileStream); //error > >Any help would be appreciated thanks. My xls file is attached. I don''t have this problem with all excel files, I''m trying to figure out what''s special about this one.

bguideOut.zip


AD Administrator Syncfusion Team April 11, 2006 07:35 AM UTC

Hi Brian, Thaks for uploading the file. I was able to see the problem and have created a bug report with the development team [BugID:#1863]. We will fix this issue as soon as possible.We will inform you when this bug is fixed. Thanks, Bharath.


BR Brian Richards April 11, 2006 12:43 PM UTC

Thanks please do notify me. >Hi Brian, > >Thaks for uploading the file. I was able to see the problem and have created a bug report with the development team [BugID:#1863]. We will fix this issue as soon as possible.We will inform you when this bug is fixed. > >Thanks, > >Bharath.


AD Administrator Syncfusion Team April 13, 2006 09:32 PM UTC

Hi Brian, I am afraid we would not be able to add support for opening this file since its not a BIFF8 file. Essential XlsIO can only read an write BIFF8 files but this file is a BIFF2.1 file. You should be able to open the same file if you resave it using MS Excel into BIFF8 format. Sorry for the confusion. Best regards, Stephen. >Thanks please do notify me. > >>Hi Brian, >> >>Thaks for uploading the file. I was able to see the problem and have created a bug report with the development team [BugID:#1863]. We will fix this issue as soon as possible.We will inform you when this bug is fixed. >> >>Thanks, >> >>Bharath.

Loader.
Up arrow icon