Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am doing dev work on an existing app. The reports are being generated using excel interop assembly, version 14.0

When generating this specific type of report, I am getting this famous error "HRESULT "0x800A03EC, I have researched the forums on codeproject, stackoverflow, bytes.net and they give mixed results - some say its when u open an existing file, some save when u saving a file --> I am doing neither of the two.

Any help would be very beneficial :)

Many thanks,

The faulting code is below

C#
Object.Location(XlChartLocation.xlLocationAsNewSheet, strSheetName);

//strSheetName is "Test sheet"
//Object is not null
Posted

1 solution

I faced a similar issue like this and I could resolve it by doing the following things

1. Go to DCOM Config, find Microsoft Excel Application,go to the security tab of its properties, Select Customize, under Launch and Activation Permissions,click Edit and Add the account under which the application is running and assign Local Launch & Local Activation permissions.


2. Create a "Desktop" folder if it doesn't exists at the following location depending on which version of office is installed on your system
64bit Office: C:\Windows\System32\config\systemprofile
32bit Office: C:\Windows\SysWOW64\config\systemprofile
Then go to security tab of the properties of the "Desktop", and the account under which the application is running with default permissions (Read & execute; List folder contents; Read)

Note: System32 is for 64 bit only, so don't be confused.

Hope this helps in your case also.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900