N/APosted on - 04/05/2017
While coding in C#, I want to open a workbook in MS Excel, but it shows an error exception from hresult 0x800a03ec. On debugging, I found out that the error is due to the following code:
AppXls.Workbooks.Open(Textbook1.text, , , , “mypass”);
Here, AppXls is the Dim object.
Here is the screenshot of the error
Learn To Resolve Error Exception From Hresult 0x800a03ec Issue.
This kind of problem occurs if you are using an earlier compatible sheet (say a.xls) in place of a.xlsx
Check your file format of “Textbook1,” it should be “Textbook1.xlsx.”
If you wish to allow sheets to open in pre-office 2007 version, then it can’t contain rows exceeding 65k. You can also check the number of rows in excel sheet by pressing ctrl+down arrow key till you reach the bottom. But, if you are trying to get a range which is larger than that number of rows, then it will possibly create an error.