Exception from HRESULT: 0x800A03EC
If you are trying to send a datagridview to an Excel spreadsheet, remember that Excel cells start at Cell (1,1) but datagridview.rows and datagridview.columns are indexed at 0. So if you try to send the contents of datagridviewcell(0,0) to the Excel Cell (0,0), you'll get Exception from HRESULT: 0x800A03EC
I was googling around frantically for a good 15 minutes before slamming my palm into my forehead for that one.
Excel.Cells(0,0)=Datagridviewcellvalue // throws HRESULT: 0x800A03EC error
Excel.Cells(1,1) = Datagridviewcellvalue //no error
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on June 26, 2022Comments
-
Admin about 2 years
Any help is appreciated:
I'm developing a C#.Net app in VS2010 that interacts with Excel. The app works correctly on my local machine. Uploading to a remote Windows 2003 server however, breaks the app.
Originally, I received the following message
- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005
After Googling the problem (which suggested a permissions problem) i tried this:
- Installing Excel 2007
- Going into Component Services on the remote server and following the instructions here: http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
Now I get this message on the same operation:
- Exception from HRESULT: 0x800A03EC
Google searches seem to be suggesting that this is a version match error. However, both the local machine and the remote server use Excel 2007.
Any suggestions would be very welcome. Thanks in advance.
-Daniel