473,289 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC.

Hi there,

I am trying to export a chart using the Excel11 object from C#. I can
properly open workbooks and read cells, but calling Export() on the Chart
object throws a COMException

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

The line causing this is:

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

The JPEG filter is registered.

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

Any ideas would be greatly appreciated.

Thanks,

Steven
Nov 15 '05 #1
1 11214
For anyone who is interested in the solution...

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).
"Steven" <ms******@berkovitz.org> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I am trying to export a chart using the Excel11 object from C#. I can
properly open workbooks and read cells, but calling Export() on the Chart
object throws a COMException

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

The line causing this is:

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

The JPEG filter is registered.

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

Any ideas would be greatly appreciated.

Thanks,

Steven

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: scorpion53061 | last post by:
Additional information: Exception from HRESULT: 0x800A03EC. This code produced this error. I am pretty sure I got this to run a while back and I was wondering if you all see anything I am doing...
2
by: Jonathan Tong | last post by:
Hi Everyone, I have wrote a application which using vb.net, i part of problem is if i export the excel from my PC it will pop up a warning message. The warning message is "HRESULT 0x800A03EC" ...
0
by: Franck | last post by:
Hi, Working with a Shared Addin (Autodual Class implementing the IdExtensibility2 interface), I'm just makin test in order to fill a range with values but get ComException Error when trying to set...
2
by: Sai | last post by:
Hi, I have written a small tool for our internal purpose in VB.net. This tool reads data from logs and saves it in an excel file. This tool is working fine with MS Office 2000 but raising the...
4
by: dynastar | last post by:
I'm trying to send custom COMExceptions from my C# server. My test client in C# has no problem reading the HRESULT I send (say, 0x80040002). Needless to say, the MFC client in C++ allows this...
5
by: Mikil | last post by:
I am communicating with Excel Interop dll using c#. The get_Range function throws an exception if the parameters are invalid. For e.g. get_Range("Mikil", Type.Missing); will crash if the "Mikil"...
0
by: rGh | last post by:
Hello, I am trying to create an Excel chart from C#. I am not a very experieced programmer, so my mistake could be very trivial. The code included is a very simple example. I just wanted to...
0
by: hne | last post by:
Hi friends, I have an application, written in C#, in which I am updating an Excel spreadsheet with data I pull from a sql database. When I try to select a cell in where I want to begin inserting my...
1
by: Sep410 | last post by:
Hi all, I want to export dataset to Excel and I get an error when I run this code: For h = 2 To ds.Tables(0).Rows.Count For j = 0 To ds.Tables(0).Columns.Count - 1 ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.