0

I working on the Excel in the server and when I trying to open my Excel file with Microsoft.Office.Interop.Excel, I have this error:

Exception de HRESULT : 0x800A03EC

I check my access to my file, and my IIS account have a full control on this. This is my code :

var excelApp = new Excel.Application();
Excel.Workbook workbook = excelApp.Workbooks.Open(
                              Filepath,
                              Type.Missing, Type.Missing, Type.Missing,
                              Type.Missing, Type.Missing, Type.Missing,
                              Type.Missing, Type.Missing, Type.Missing,
                              Type.Missing, Type.Missing, Type.Missing,
                              Type.Missing,
                              true
                          );

Thanks

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Possible duplicate of [Exception HResult 0x800a03ec when trying to open Excel with Microsoft.Office.Interop.Excel.Workbooks.Open()](https://stackoverflow.com/questions/30078729/exception-hresult-0x800a03ec-when-trying-to-open-excel-with-microsoft-office-int) – d219 May 16 '18 at 21:06
  • This seems to be a fairly generic error, there are quite a few posts on this and other sites referencing it - you may want to check if the following link is relevant for what you are doing as well; https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office?wa=wsignin1.0%3Fwa%3Dwsignin1.0 – d219 May 16 '18 at 21:07
  • It is a pretty generic Excel runtime error. Find hits by googling "excel workbook open error 1004". Lotsa hits. – Hans Passant May 16 '18 at 21:39

0 Answers0