Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Unassigned: xlApp.Workbooks.Open throwing com exception [15233]

$
0
0
Hi,

What are the possible causes of the xlApp.Workbooks.Open(<filename>) throwing a System.Runtime.InteropServices.COMException? I tried to check the stack trace and I can't find a cause other than the InnerException being a NullPointerException

Interop Error is: HRESULT: 0x800A03EC
Error Code: -2146827284

Basically after the Open statement, the next statements before the process is completed is as follows:

//other page setting details

xlWorkbook.Save();
xlWorkbook.SaveAs(strFileName.Replace(".xlsx", ".xlsb"), _Excel.XlFileFormat.xlExcel12);
File.Delete(strFileName);

The file that it is attempting to save can already exist or can be a new file.

This is based on the download source code (epplus-59920b4b5f9f.zip)

Comments: Changing my question. I checked the other classes which are calling the Open method and they are working properly. However, the generated excel file saved in EPPlus in the class as xlsx is corrupted. This was the reason why the open method call failed. However, I would like to know how to determine the cause of the excel file getting corrupted. is there a log that is generated for me to trace?

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>