A
Anand Nichkaode
Hi all,
We are using Excel for reporting in our organization. Basically there is a
Java web application which instantiates Excel 2007 with an XLAM. This XLAM
opens a Report Template(an .xls, .xlsm file, name supplied as command line
parameter). The Template has a datasheet where we have multiple ranges and
the Reportsheet which shows the final report based on the data from the
Datasheet. The Reportsheet contains formulas to show the final output. It
could contain Charts/Graphs also. The data is fetched from SQL server and is
pasted on the Ranges. And finally when all the data is pasted and Macro is
run the Template is saved as a Final Report somewhere on the Report Server.
The Excel runs in the background in all this process. There could be multiple
instances of Excel running on the same box. The instances run under separate
WindowStation.
In this process a macro,PasteChartAsGraphic, present in the template is
invoked by the XLAM. The macro basically is about pasting the images of the
charts present in the template and later deleting the original charts. So the
template would be left with the chart images instead of actual chart objects
after the macro is Run.
The macro executes successfully for most of the times but failes randomly
with different errors. Last time it failed with the following error. Excel
ends up in showing the following dialog box.
"Microsoft Visual Basic". The dialog contained the following text content:
[Run-time error '-2147417848 (80010108)':##Method 'CopyPicture' of object
'ChartObject' failed][&Continue][&End][&Debug][&Help]
I can post the macro code if anybody is interested in looking into it.
If anybody have any idea please let me know as it is a blocking issue in our
process.
Any help appreciated.
Thanks in advance.
We are using Excel for reporting in our organization. Basically there is a
Java web application which instantiates Excel 2007 with an XLAM. This XLAM
opens a Report Template(an .xls, .xlsm file, name supplied as command line
parameter). The Template has a datasheet where we have multiple ranges and
the Reportsheet which shows the final report based on the data from the
Datasheet. The Reportsheet contains formulas to show the final output. It
could contain Charts/Graphs also. The data is fetched from SQL server and is
pasted on the Ranges. And finally when all the data is pasted and Macro is
run the Template is saved as a Final Report somewhere on the Report Server.
The Excel runs in the background in all this process. There could be multiple
instances of Excel running on the same box. The instances run under separate
WindowStation.
In this process a macro,PasteChartAsGraphic, present in the template is
invoked by the XLAM. The macro basically is about pasting the images of the
charts present in the template and later deleting the original charts. So the
template would be left with the chart images instead of actual chart objects
after the macro is Run.
The macro executes successfully for most of the times but failes randomly
with different errors. Last time it failed with the following error. Excel
ends up in showing the following dialog box.
"Microsoft Visual Basic". The dialog contained the following text content:
[Run-time error '-2147417848 (80010108)':##Method 'CopyPicture' of object
'ChartObject' failed][&Continue][&End][&Debug][&Help]
I can post the macro code if anybody is interested in looking into it.
If anybody have any idea please let me know as it is a blocking issue in our
process.
Any help appreciated.
Thanks in advance.