Hi,
I'm trying to load an Excel file and the Load function through an exception 'Attempted to read past the end of the stream'
It is an Excel 2003 file and I can open it using Excel.
Thanks for your help,
Can you post the code that is giving you this exception?
Hi Mike,
The exception occurs when openning the file:
Workbook workbook = Infragistics.Excel.Workbook.Load(fileName);
This is working with hundreds of files but with 1 or 2 of them we have a problem. If you like I can email you the excel.
Thanks
Okay, this may be a clue. When I open that spreadsheet in excel 2010 I get a message that it came from an internet source and editing was disabled. I'd ignored it previously as I didn't need to edit the file. This time I told it to make the file editable, then saved it. The file then loaded okay with the original code. So, might be worth investigating what that error means?
Could be a red herring though - I compared the original file and the file saved by excel, and there were numerour differences (more different than the same, to be honest).
This bug was submitted as TFS33952 and was fixed in versions 9.2 and later. Unfortunately, I did not find a good workaround for this issue, so you will have to wait for the next service release.
I'm using 10.1, so shouldn't that mean it's fixed for me? It doesn't appear to be :-(
Kev
I only fixed the bug yesterday. You will need to wait for the next SR to be released.
I am using Infragistics4.WebUI.Documents.Excel.v11.2I have an excel template file Test.xlt (File Attached) which contains an image in the headerWhen I try to load the file using the following codeWorkbook workBook = Workbook.Load(Test.xlt)
I get the following exception "Attempted to read past the end of the stream."Note: If there is no image in the header then it works fine.
I need to include images in the header and footer.
Kindly provide a solution ASAP.
Thanks,
Utkarsh Bandekar
I believe this issue has already been reported (issue id 101503) and fixed. Try upgrading to the latest SR and see if that fixes your issue.