Hi,

First you need to create the Excel application object. This is true for
almost any automation enabled EXE server - you need to start it and then
request the creation of each sub-component from the application object and
so on in depth.

And second the way you are going is not good for a WEB server. I am sure
this
will do something of use on a local machine if processed as desktop
application
(not under IIS but under ALP or HSP for example) but on the server starting
a user-oriented application on a page request is almost a ... well not a
good idea at all. I did such things just to see what is possible to be
donel, but be soure the productivity will be lower than you can expect and
also you will have thousands of problems and need of deep COM knowledge
(realy deep). So see for some other way - for example there are controls
able to generate Execel documents - unfortunatelly their price is high. Or
generate a file that the excel will import without troubles in some other
format. One of them is SILK - see www.wotsit.org and search for SILK. It is
textual and is comming from Microsoft so it will work but you will need to
spend some time on it. Anyway,  believe me starting excel from the IIS is
not a good way to solve the problem.

Regards

Michael

-----Original Message-----
From: GDES Urcia Nomberto Luis A. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 8:19 PM
To: ActiveServerPages
Subject: Error opening files with ASP and Office 2000


Hi everybody:
                I have an issue when generating excel files from an ASP page
with Office 2000.
I'm using the following code to do so but apparently there's an error when
opening an existing file:

*****************************************************
Activex Component Can't Create Object "Excel.Sheet"
*****************************************************

This is the code:
*************************************************************
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<%
cPath = Request.ServerVariables("PATH_TRANSLATED")
While (Right(cPath, 1) <> "\" And Len(cPath) <> 0)
        iLen = Len(cPath) - 1
        cPath = Left(cPath, iLen)
Wend

' File
cPath1 = cPath & "downloads\"
' Define Objeto Excel
Set ExcelFace = CreateObject("Excel.Sheet")

' Not visible for the user
ExcelFace.Application.Visible =true

' Open work file
cFileName1 = "DOA001351398088076.xls"

Response.Write("ruta:" & cPath1 + cFileName1)
ExcelFace.Application.Workbooks.Open (cPath1 + cFileName1)

ExcelFace.Application.ActiveWorkbook.Save
ExcelFace.Application.Quit
Set ExcelFace = Nothing

%>

<P>&nbsp;</P>

</BODY>
</HTML>
******************************************************************

This code was working very good with ofiice 97. Is there a tip i have to
use?

thanks in advance,

Luis Urcia

---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to