Excel COM Chart.Export throws COMException

Posted on 2005-04-08
Last Modified: 2013-11-25
Hi there,

I am trying to export a chart using the Excel11 object from within ASP.NET. Calling Export() on the Chart
object throws the following COMException

Exception: System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC.
at Excel._Chart.Export(String Filename, Object FilterName, Object
at MBCCS.LeParc.Importer.Importer.GetImageInfoFromWorksheet(Worksheet
worksheet) in d:\source\leparc\importer\importer.cs:line 211

The line causing this is:

tempChart.Chart.Export(filename, "JPEG");

I am trying to export a picture from excel to an external file.  What I am doing is creating a new
chart, copying the picture to the chart, then exporting the chart.  The
Excel process is running under the ASPNET account.

The person who posted a similar question before answered his own question as :

The problem was that the ASPNET user account didn't have access to the MSI Installer COM object.  What was happening is that the .Export() method searches the HKCU registry key for available graphic filters.  Because the ASPNET user is not an interactive user, no user profile had been created for it, and calling the .Export() method prompted MSI to create the profile (including the HKCU hive).

But I haven't unerstood anything from his answer,  I would appreciate it if someone can explain it to me what to do.



Question by:AnuPutcha
    LVL 26

    Accepted Solution

    what i understand from the solution u have pasted is that the user requires access to the MSI Installer COM object .. as the user is not interactive means that he has never logged on into the computer, the user profile is not created and so the he does not have any graphic filters for that user in the registry ...

    so giving user access services "Windows Installer" C:\WINDOWS\system32\msiexec.exe
    should solve ur problem or just loggin on to ur PC as users .. but then u should be aware of the password ..

    Expert Comment

    Hi guys, I have the same problem, and I tried this solution but it doesn't work,
    and I gave the permission to "Network Services" because it's on Win Server 2003, and when it didn't work I add ASPNET and gave it FULL control but still the same error !!!
    do we need to restart the server to make it work,

    Please help me !

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
    Source Error: 
    Line 115:                c = CType(.ChartObjects(1).Chart, Excel.Chart)
    Line 116:
    Line 117:                c.Export(imagePath, "JPG")
    Line 118:
    Line 119:

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now