|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Excel application createobject(Excel.Application) Error
HI All, I'm getting the error message as listed down here when I use createobject (Excel.Application) in asp plain script. Well what I was trying to do is grab the recordset from access and convert to excel. It works well with my localhost. But when I put it online using web hosting the error appears. How to overcome this problem. Please Help Me.
Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object: 'Excel.Application' /spm/excel.asp, line 72 |
|
#2
|
||||
|
||||
|
do you have excel installed on the server?
__________________
Come JOIN the party!!! Quote of the Month: Sacrifice (Temple): All we ask here is that you give us your heart. Questions to Ponder: If the #2 pencil is the most popular, why is it still #2? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
||||
|
||||
|
this involve lots of permissions issues.
if you're hosted, the chance you'll be able to use your code is very very small. |
|
#4
|
|||
|
|||
|
Re: Excel application createobject(Excel.Application) Error
Thanks for the reply guys. I really appreciate it . I have asked the web hosting people, they even gave me full access to the server and network permissions. But the problem is still there. I don't know how to setup a web server and make other computers from outside to connect and make a web based application.
Regards, Suresh |
|
#5
|
||||
|
||||
|
you didn't answer mehere's question: do you have Office installed on the server?
|
|
#6
|
|||
|
|||
|
Re: Excel application createobject(Excel.Application) Error
Sorry guys ,
The web hosting people gave me wrong information saying that the server has got excel installed. Actually there is none. I'm very sorry for this wrong information. He said he will install it and inform me as soon as possible. I'll give it a try then get to u all. Thanks for the help. Regards, Shulan27 |
|
#7
|
|||
|
|||
|
Re: Excel application createobject(Excel.Application) Error
Hi Everyone ,
Well I worked together with the web hosting person and the excel file successfully installed. After this, there was another problem arised which was permission denied. I manage to solve this by asking him to give me full permission. Now there is a new error which is Microsoft Excel error '800a03ec' Microsoft Excel cannot access the file 'C:'. There are several possible reasons: • The file name or path name does not exist. • The file you're trying to open is being used by another program. Close the document in the other program, and try again. • The name of the workbook you're trying to save is the same as the name of another document that is read-only. Try saving the workbook with a different name. /spm/excel.asp, line 404 My coding is as below: Set ExcelApp = CreateObject("Excel.Application") ExcelApp.Application.Visible = True Set ExcelBook = ExcelApp.Workbooks.Add Regards, Shulan27[/QUOTE] |
|
#8
|
||||
|
||||
|
what is line 404? show more of your code
|
|
#9
|
|||
|
|||
|
Hi Mehere ,
The Line number 404 looks like this ExcelBook.SaveAs "c:\yourfile.xls" ' Line number 404 'ExcelApp.Application.Quit ' Line Number 406 'Set ExcelApp = Nothing ' Line Number 407 If I commented out the Line number 406 and 407 I received that error message but if I comment out line number 404 It doesn't give me any error it just that there is no excel file being showed in my system. It works fine in my localhost. It should create book1 and don't ask for any saving instructions. Regards, Shulan27 |
|
#10
|
||||
|
||||
|
try changing this:
Code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Add
to this: Code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
ExcelApp.Workbooks.Add
ExcelApp.Workbooks(1).ActiveSheet.Name = "Worksheet_name" 'name the worksheet
Set ExcelBook = ExcelApp.ActiveSheet
and this: ExcelBook.SaveAs "c:\yourfile.xls" to this: ExcelBook.ActiveWorkbook.SaveAs("c:\yourfile.xls") |
|
#11
|
|||
|
|||
|
Re: Excel application createobject(Excel.Application) Error
Dear Mehere ,
Thanks again for the reply. Well I did try the code that you gave me and now it shows a different error which is Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'ActiveWorkbook' /spm/excel.asp, line 415 the line 415 is ExcelBook.ActiveWorkbook.SaveAs("c:\yourfile.xls"). Regards, Shulan27 |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Excel application createobject(Excel.Application) Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|