HRESULT exception: 0x800A03EC

Any help is appreciated:

I am developing a C # .Net application in VS2010 that interacts with Excel. The application works correctly on my local machine. However, downloading to a remote Windows 2003 server disrupts the application.

I originally received the following message

  • Retrieving the factory COM class for a component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

After the Google issue (permission issue) arose, I tried this:

Now I get this message in the same operation:

  • HRESULT exception: 0x800A03EC

Google searches seem to suggest that this is a version matching error. However, both the local machine and the remote server use Excel 2007.

Any suggestions would be greatly appreciated. Thanks in advance.

-Daniel

+3
source share
4 answers

If you are trying to send a datagridview to an Excel spreadsheet, remember that Excel cells start in cell (1,1), but datagridview.rows and datagridview.columns are indexed to 0. So if you try to send the contents of datagridviewcell (0,0) to cell Excel (0,0), you will get an exception from HRESULT: 0x800A03EC

I desperately searched for a guru for 15 minutes before clapping my hand on the forehead for this.

Excel.Cells(0,0)=Datagridviewcellvalue // throws HRESULT: 0x800A03EC error 
Excel.Cells(1,1) = Datagridviewcellvalue //no error
+1
source

Suggestions:

  • Excel "en_US". , 0x800A03EC, . Windows 2003 , , , , . ! .
  • , . 911 . . , .
0

. , Excel. YMMV

0

ASP.Net "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" , , .

After checking that it does not work, restart the system and check ... There is a chance that this will happen due to damaged files. So check the drive.

thank

0
source

Source: https://habr.com/ru/post/1749571/


All Articles