I have this code that works perfectly on my development machine when I
deployed it at customer site it gets exception. Here is the error and my code:

thanks

error
==========
Exception from HRESULT: 0x800A03EC.
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:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:[COMException (0x800a03ec): Exception from HRESULT: 0x800A03EC.]
Excel._Chart.Export(String Filename, Object FilterName, Object
Interactive) 0
apac2.WebForm1.copyDataAndRunMacro(String fName, String eventdir)
apac2.WebForm1.uploadButton_Click(Object sender, EventArgs e)
System.Web.UI.WebControls.Button.OnClick(EventArgs e) 108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) 57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) 18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) 33
System.Web.UI.Page.ProcessRequestMain() 1292
my code
========
Excel.Range chartRange = dstMsh.get_Range(quot;B15quot;, quot;Dquot;
chartData.ToString());
Excel.ChartObjects chObjs =
(Excel.ChartObjects)dstMsh.ChartObjects(Type.Missi ng);
Excel.ChartObject chObj = chObjs.Add(100, 200, 400, 300);
Excel.Chart chart = chObj.Chart;

chart.SetSourceData(chartRange, Type.Missing);
chart.ChartType = Excel.XlChartType.xlBarClustered;

string imgDir = quot;C:\\inetpub\\wwwroot\\apacevent\\images\\quot;;
string imgSaveAs = getCurrentTime() quot;_chart.gifquot;;
chart.Export(imgDir imgSaveAs, quot;GIFquot;, false);

imgChart.Visible = true;
imgChart.ImageUrl = quot;images\\quot; imgSaveAs;Hi,

I have no idea why you code is not working but does it make sense to
name your variable, chart, with the same name as an existing excel
object type?

Cheers
Andy

asp newbie wrote:
gt; I have this code that works perfectly on my development machine when I
gt; deployed it at customer site it gets exception. Here is the error and my code:
gt;
gt; thanks
gt;
gt; error
gt; ==========
gt; Exception from HRESULT: 0x800A03EC.
gt; Description: An unhandled exception occurred during the execution of the
gt; current web request. Please review the stack trace for more information about
gt; the error and where it originated in the code.
gt;
gt; Exception Details: System.Runtime.InteropServices.COMException: Exception
gt; from HRESULT: 0x800A03EC.
gt;
gt; Source Error:
gt;
gt; An unhandled exception was generated during the execution of the current web
gt; request. Information regarding the origin and location of the exception can
gt; be identified using the exception stack trace below.
gt;
gt; Stack Trace:
gt;
gt;
gt; [COMException (0x800a03ec): Exception from HRESULT: 0x800A03EC.]
gt; Excel._Chart.Export(String Filename, Object FilterName, Object
gt; Interactive) 0
gt; apac2.WebForm1.copyDataAndRunMacro(String fName, String eventdir)
gt; apac2.WebForm1.uploadButton_Click(Object sender, EventArgs e)
gt; System.Web.UI.WebControls.Button.OnClick(EventArgs e) 108
gt;
gt; System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) 57
gt; System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
gt; sourceControl, String eventArgument) 18
gt; System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) 33
gt; System.Web.UI.Page.ProcessRequestMain() 1292
gt;
gt;
gt;
gt; my code
gt; ========
gt; Excel.Range chartRange = dstMsh.get_Range(quot;B15quot;, quot;Dquot;
gt; chartData.ToString());
gt; Excel.ChartObjects chObjs =
gt; (Excel.ChartObjects)dstMsh.ChartObjects(Type.Missi ng);
gt; Excel.ChartObject chObj = chObjs.Add(100, 200, 400, 300);
gt; Excel.Chart chart = chObj.Chart;
gt;
gt; chart.SetSourceData(chartRange, Type.Missing);
gt; chart.ChartType = Excel.XlChartType.xlBarClustered;
gt;
gt; string imgDir = quot;C:\\inetpub\\wwwroot\\apacevent\\images\\quot;;
gt; string imgSaveAs = getCurrentTime() quot;_chart.gifquot;;
gt; chart.Export(imgDir imgSaveAs, quot;GIFquot;, false);
gt;
gt; imgChart.Visible = true;
gt; imgChart.ImageUrl = quot;images\\quot; imgSaveAs;
gt;

--

Andy Pope, Microsoft MVP - Excel
www.andypope.info