Chart.Export creates zero byte GIF and hangs on server

  • Thread starter Thread starter AB
  • Start date Start date
A

AB

[note: I posted this on excel.interopoledde, then noticed
that this group seems to be where all the action is.
Sorry for the double post.]

Doing Excel interop in C# ASP.Net. The following line
works fine on several PCs, but not on the production
environment:

MyChart.Chart.Export(myFileName, null, null);

This creates a GIF image of the chart, except on the
server where a zero length GIF file is created and the
ASP.Net app basically hangs up.

Does anyone have any ideas why this straight forward piece
of code would not work? One more piece of info... I am
able to successfuly save the worksheet into the same
folder on the web site.

Thanks,

AB
 
Just a thought, could you export the chart locally, then copy it to the
server?

- Jon
 
Jon, thanks for replying.

At this point we have to do it on the web server.

This problem is very bizzare. All of my interop code is
working fine. Only the Chart.Export does not work. I did
a work around where I call a macro in the sheet to export
the chart. Now this work around works on the staging
server, but get this... Neither approach works in
production!

In production all of the interop code works fine. But
neither a call to Chart.Export or a Excel macro that does
a Chart.Export will produce a GIF. And in the case of the
production server, we don't even get a zero byte .GIF file.

Any ideas?

Thanks,
AB
-----Original Message-----
Just a thought, could you export the chart locally, then copy it to the
server?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______
[note: I posted this on excel.interopoledde, then noticed
that this group seems to be where all the action is.
Sorry for the double post.]

Doing Excel interop in C# ASP.Net. The following line
works fine on several PCs, but not on the production
environment:

MyChart.Chart.Export(myFileName, null, null);

This creates a GIF image of the chart, except on the
server where a zero length GIF file is created and the
ASP.Net app basically hangs up.

Does anyone have any ideas why this straight forward piece
of code would not work? One more piece of info... I am
able to successfuly save the worksheet into the same
folder on the web site.

Thanks,

AB

.
 
Thanks for the info Vic. Sure sounded like the same
problem but turns out it was something else!

In case anyone is interested the problem was with the
Office installation. The graphics filters were not
installed on the web servers!
 
Back
Top