Error while opening workbook

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 data sheet where we have multiple
ranges and the Report sheet 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 when the template name is passed as command line parameter
to Excel,
the XLAM receives this command line paramter and takes out the Template name
together
with path and stores in some variable. This variable then is used while
opening the
workbook with the following statement

Dim objRPT as workbook

set objRPT = workbooks.open(<template name>)

This template could reside locally or could be on some network path. The
particualr
statement, to open the template, given above throws the following error,
opens the
template successfully, but the objRPT is still NOTHING.

XXXXXXXXXXXXXX.xls' could not be found. Check the spelling of the file name,
and verify that the file location is correct.

If you are trying to open the file from your list of most recently used
files,
make sure that the file has not been renamed, moved, or deleted.

I could perform all the thigs successfully on this opened template like, I
check whether
a particular Macro exists or not, whether particular ranges are defiend in
the template or not,
paste some data onto ranges, etc.

But I cannot save any changes I have made in the template as the objRPT is
NOTHING.

I have tried the solution suggested by Microsoft guys which is given below
but it didn't work for me.

http://support.microsoft.com/kb/207574

If anybody have any idea please let me know as it is a blocking issue in our
process.

Any help appreciated.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top