FileStream stream = File.OpenRead(sFileName);
Workbook book = Workbook.Load(stream);
Gives Error: Attemped to read past the end of the stream.
Get this with large .xls (old version of excel file) when trying to read. If it is .xlsx which is Excel 2010 format don't get error. The file I tried to use was only 3.9 MB in side. It opens fine in Excel 2013 (I have Office 2013 installed).
Anything I need to do except convert over to xlsx format which works - I get the excel files from 3rd party and don't want to open and save every file for infragistics to work on the file.
If you need an example file, I can email it to you or something (I didn't know how to include the file in the forum post, although I figure you probably know about this error and how to fix in code hopefully).
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components
Hello ,
Thank you for the provided sample file. I have inspect this file and I believe the Excel file was encrypted at some point because it is actually still encrypted internally. But a default password is used, which Excel will automatically try to use when opening the file, so the user is not prompted to type in the password. However, we are not permitted to include encryption or decryption support for legal reasons, so I cannot implement the support to load this file correctly. So as a workaround of this issue I could suggest you to save your excel file as xlsx using Microsoft .Office.Interop.Excel 14.0 assemblies. I meant instead to open and close your file manually to use code that will do this for you, please see attached sample. Please feel free to modify my sample based on your custom needs.
I hope that this will helps you.
OK, here is the file.
Can you please provide us sample xls file in order to investigate this issue, you could attach this file in zipped format . Please click on “Reply” button to my post, go to “Options” tab (clicking on “Reply”, you will be on “Compose” tab), press on “Add/Update” button and attach your files.
I am waiting for your details.
PS> no password protection or anything so it should open. I saw a similar post and it looks like others are getting same error. If you need a sample file, give me an email or FTP site to push a sample file which has the error.