Exception from HRESULT: 0x800A03EC

10,920

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
Share:
10,920
Admin
Author by

Admin

Updated on June 26, 2022

Comments

  • Admin
    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:

    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