LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
san san is offline
external usenet poster
 
Posts: 1
Default workbooks.open function fails to open an existing excel file when used in ASP, but works in VB.

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

Santhosh

 
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
Can I open an existing Excel spreadsheet in works? Leigh Anne Excel Discussion (Misc queries) 1 June 23rd 06 11:52 PM
How can I get existing Excel workbooks to open in separate windows Christy99 Excel Worksheet Functions 1 March 22nd 05 12:26 AM
Workbooks.open method fails JAT Excel Programming 3 January 24th 05 08:19 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM
Open method of workbooks fails when Excel is hosted in IE [email protected] Excel Programming 5 January 30th 04 02:19 AM


All times are GMT +1. The time now is 02:45 PM.

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"