workbooks.open function fails to open an existing excel file when used in ASP, but works in VB.

S

shirdisanthosh

Hi all,
The following script (asp code) works like a charm on my workstation
IIS

Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLICATION")
Set objWorkBook = objExcel.Workbooks.Open("C:\test\test.xls")
objWorkBook.SaveAs ("C:\test\test2.xls")
objWorkBook.Close True
Set objWorkBook = Nothing
Set objExcel = Nothing


The code above is just a sample, the actual app is ASP and involves DB
access, reading/writing excel files, ...
Trying to narrow the scope I found out that the simple script above
does not work on the server, rather works fine on my workstation IIS.
(Note: My workstation also has IIS)
The test.xls file is the most simple XL file ever, and the path is OK
The NT account I use definitely has write permissions on the target
directory, and test2.xls does not exist when I run the script.

Excel is installed on the server and works normally when used as a
client app.
But it seems to fail miserabily when used as an activeX object. The
script above says it can't find the file, but both the directory and
the fiel definitely exist on the server.

Any ideas what could break / alter the way excel works when used as an
activeX object from another App/Script ?

Any comments welcome
 

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