We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Critical Error: Unable To Read File

We are trying to export our data as reports into the excel file. Every things happens smoothly till saving the file. While opening file it throws an error saying "Unable to read file". We using Syncfusion.Core, Syncfusion.XLSIO.Web and Syncfusion.XLSIO.Base. Please help on this.



Sysncfusion_9f061d56.zip

4 Replies

AD Administrator Syncfusion Team December 11, 2008 09:49 AM UTC

included the file

>We are trying to export our data as reports into the excel file. Every things happens smoothly till saving the file. While opening file it throws an error saying "Unable to read file". We using Syncfusion.Core, Syncfusion.XLSIO.Web and Syncfusion.XLSIO.Base. Please help on this.



Sysncfusion_9f061d56.zip



Master_fe3e44c2.zip


GM Geetha M Syncfusion Team December 11, 2008 11:14 AM UTC

Hi Vinay,

Syncfusion.XlsIO.Base alone can be used instead of using Syncfusion.XlsIO.Base and Syncfusion.XlsIO.Web if you are not running the application under Medium Trust.

I created a test sample and it works fine for me. You can check it in the below link:

http://websamples.syncfusion.com/samples/XlsIO.Web/6.4.0.15/F78381/main.htm

You can also check our online sample in the below link:

http://www.syncfusion.com/sfwebsamples/xlsio.web/samples/2.0/Data%20Binding/ImportExportDataTable/CS/Default.aspx

Could you please try running the above samples and if still see the issue, modify the sample and send back to me so that I could find the cause of the problem?

Regards,
Geetha



AD Administrator Syncfusion Team December 11, 2008 05:22 PM UTC

Hi,

I've attached an excel file generated at our end. Problem is that... sometimes the (after running the reporting engine)generated file opens some times it doesn't. The perticular scenario where we are geting the issue has lots of data (Close to 5000 rows)... Using the same reporting class which we are using; we are able to generate the excel files and they are opening properly.

We are using Sysncfusion in othere applications here but are not geting any issue. It seems that it's some kind of specific issue which we are not geting on our local machine however on the deployment server.

Regards,
Vinay

>Hi Vinay,

Syncfusion.XlsIO.Base alone can be used instead of using Syncfusion.XlsIO.Base and Syncfusion.XlsIO.Web if you are not running the application under Medium Trust.

I created a test sample and it works fine for me. You can check it in the below link:

http://websamples.syncfusion.com/samples/XlsIO.Web/6.4.0.15/F78381/main.htm

You can also check our online sample in the below link:

http://www.syncfusion.com/sfwebsamples/xlsio.web/samples/2.0/Data%20Binding/ImportExportDataTable/CS/Default.aspx

Could you please try running the above samples and if still see the issue, modify the sample and send back to me so that I could find the cause of the problem?

Regards,
Geetha





GM Geetha M Syncfusion Team December 12, 2008 05:38 AM UTC

Hi Vinay,

Could you please check if you have closed / disposed the workbook and excel engine once all the workbook operations are completed? The following code snippet illustrates this:

workbook.Close();
excelEngine.Dispose();

Also, could you please send us your code snippet or the details of what manipulation is done on the spreadsheet using XlsIO so that we could recreate the problem and find the cause of the same? I am able to see that the output file you provided has the issue. But it would be more helpful if I am provided with the details of how the file is generated.

Please let me know if you have any difficulties.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon