CreateObject("Excel.Application") 
Author Message
 CreateObject("Excel.Application")

Are you allowing anonymous access?  If you are, you need to give the IUSR_machinename account
read/execute access to the Office folder (and subfolders) where Excel is installed on the server...

Even on an authenticated site, you need to make sure the account(s) that the ASP script will run
under has access to Excel.

BTW - using WScript.CreateObject() in ASP is *never* a solution since WSH is not hosting the script,
ASP is...

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> The Server.CreateObject("Excel.Application") gives me the following
> error:
> Server object error 'ASP 0177 : 800401f3'

> Server.CreateObject Failed

> I tried with WScript.CreateObject("Excel.Application") It also give me
> same error. I installed the excel application on the same machine not
> under the inetpub.

> Thanks

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.



Mon, 07 Apr 2003 03:00:00 GMT  
 CreateObject("Excel.Application")
The Server.CreateObject("Excel.Application") gives me the following
error:
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

I tried with WScript.CreateObject("Excel.Application") It also give me
same error. I installed the excel application on the same machine not
under the inetpub.

Thanks

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 08 Apr 2003 11:11:26 GMT  
 CreateObject("Excel.Application")
Thanks Michael

 I checked the access permission on the C:\program files\office folder.
It has full control to Everyone. I add the IUSR_mechinename into the
administrator.

 Still the ASP is not running.


<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT Language=VBScript>
Sub Button1_OnClick
  Dim sInFile
  Dim sOutFile
  sInFile = "C:\temp\vbscript\book1.xls"
  sOutFile = "C:\temp\vbscript\mybook.csv"

  Dim objXL
  Set objXL = Server.CreateObject("Excel.Application")
  Dim xlworkBook
  Set xlworkBook = objXL.Workbooks.Open(sInFile)

  'objXL.Visible = TRUE
  xlworkBook.SaveAs sOutFile,6
  xlworkBook.Close False
End Sub
</SCRIPT>
</HEAD>
<BODY>
<H3>A SIMPLE</H3><HR>
<FORM><INPUT NAME="Button1" TYPE="BUTTON" VALUE="CLICK HERE"></FORM>
</BODY>
</HTML>

 Thanks



Quote:

> Are you allowing anonymous access?  If you are, you need to give the

IUSR_machinename account
Quote:
> read/execute access to the Office folder (and subfolders) where Excel

is installed on the server...
Quote:

> Even on an authenticated site, you need to make sure the account(s)

that the ASP script will run
Quote:
> under has access to Excel.

> BTW - using WScript.CreateObject() in ASP is *never* a solution since

WSH is not hosting the script,
Quote:
> ASP is...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --



Quote:
> > The Server.CreateObject("Excel.Application") gives me the following
> > error:
> > Server object error 'ASP 0177 : 800401f3'

> > Server.CreateObject Failed

> > I tried with WScript.CreateObject("Excel.Application") It also give
me
> > same error. I installed the excel application on the same machine
not
> > under the inetpub.

> > Thanks

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Tue, 08 Apr 2003 03:00:00 GMT  
 CreateObject("Excel.Application")

It is a Bad Idea(tm) to be using applications such as Excel
server side from ASP.

Excel has many permission requirements including several
registry entries, access to the Program Files\Office folder
(including Change!) and access to the System32 folder
(including Change in most cases!).

As you can see, this is a huge security risk. If you search
ntbugtraq.com for something like "Secure Office" some
people have detailed instructions on securing your box
for office and permission requirements.

Here's an example:
http://www.ntbugtraq.com/default.asp?pid=36&sid=1&A2=ind9906&L=NTBUGT...
(note: URL may wrap, and break)

Again, I strongly urge you reconsider using the Excel.Application object.

If you need to get at data in an excel spreadsheet, you should use
the ODBC drivers for Excel. They're much less a drain on resources and
don't pose a giant security risk to your server.

-Chad

Quote:

> Thanks Michael

>  I checked the access permission on the C:\program files\office folder.
> It has full control to Everyone. I add the IUSR_mechinename into the
> administrator.

>  Still the ASP is not running.


> <HTML>
> <HEAD>
> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
> <SCRIPT Language=VBScript>
> Sub Button1_OnClick
>   Dim sInFile
>   Dim sOutFile
>   sInFile = "C:\temp\vbscript\book1.xls"
>   sOutFile = "C:\temp\vbscript\mybook.csv"

>   Dim objXL
>   Set objXL = Server.CreateObject("Excel.Application")
>   Dim xlworkBook
>   Set xlworkBook = objXL.Workbooks.Open(sInFile)

>   'objXL.Visible = TRUE
>   xlworkBook.SaveAs sOutFile,6
>   xlworkBook.Close False
> End Sub
> </SCRIPT>
> </HEAD>
> <BODY>
> <H3>A SIMPLE</H3><HR>
> <FORM><INPUT NAME="Button1" TYPE="BUTTON" VALUE="CLICK HERE"></FORM>
> </BODY>
> </HTML>

>  Thanks



> > Are you allowing anonymous access?  If you are, you need to give the
> IUSR_machinename account
> > read/execute access to the Office folder (and subfolders) where Excel
> is installed on the server...

> > Even on an authenticated site, you need to make sure the account(s)
> that the ASP script will run
> > under has access to Excel.

> > BTW - using WScript.CreateObject() in ASP is *never* a solution since
> WSH is not hosting the script,
> > ASP is...

> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> > --


> > > The Server.CreateObject("Excel.Application") gives me the following
> > > error:
> > > Server object error 'ASP 0177 : 800401f3'

> > > Server.CreateObject Failed

> > > I tried with WScript.CreateObject("Excel.Application") It also give
> me
> > > same error. I installed the excel application on the same machine
> not
> > > under the inetpub.

> > > Thanks

> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Tue, 08 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. CreateObject("Excel.Application") Error

2. CreateObject("Excel.Application") problem

3. CreateObject("Excel.Application")

4. CreateObject("Excel.Application")

5. Set xLApp = CreateObject("Excel.Application")

6. Server.CreateObject("Excel.Application")

7. CreateObject("Excel.Application") Fails on NT

8. CreateObject("excel.application", "myremotecomp") dosent work

9. CreateObject("excel.application", "myremotecomp") dosent work

10. CreateObject("Excel","//server"), MsgBox output

11. CreateObject("Excel","//server"), MsgBox output

12. GetObject("","InternetExplorer.Application") fails in Excel VBA

 

 
Powered by phpBB® Forum Software