Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
asp newbie
 
Posts: n/a
Default I get COMException while exporting chart on IIS 6.0.

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("B15", "D" +
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 = "C:\\inetpub\\wwwroot\\apacevent\\images\\";
string imgSaveAs = getCurrentTime()+ "_chart.gif";
chart.Export(imgDir + imgSaveAs, "GIF", false);

imgChart.Visible = true;
imgChart.ImageUrl = "images\\" + imgSaveAs;

  #2   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope
 
Posts: n/a
Default I get COMException while exporting chart on IIS 6.0.

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:
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("B15", "D" +
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 = "C:\\inetpub\\wwwroot\\apacevent\\images\\";
string imgSaveAs = getCurrentTime()+ "_chart.gif";
chart.Export(imgDir + imgSaveAs, "GIF", false);

imgChart.Visible = true;
imgChart.ImageUrl = "images\\" + imgSaveAs;


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating a Chart object Hari Prasadh Charts and Charting in Excel 6 August 2nd 05 07:22 PM
Urgent Chart Assistance Brent E Charts and Charting in Excel 1 May 10th 05 09:09 AM
Urgent Chart Questions Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Urgent Chart Assistance Requested Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
exporting a chart to gif format using COM (Excel v11 and .net) Katie Charts and Charting in Excel 2 December 31st 04 06:04 AM


All times are GMT +1. The time now is 07:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"