Solved

ActiveX component can't create object

Posted on 2002-06-11
14
3,866 Views
Last Modified: 2012-06-22
I have visual basic program that calls to excel and save if html format a xls file.

When I execute it inside on cgi (with iis) gives the error "Error: 429 ActiveX component can't create object"
when execute the instruction 'Set objExcel = CreateObject("excel.application")' .... but the same procedure works if I execute it
in the environment of development of visual basic.

Why?

This is the code:

    Dim objExcel As Excel.Application
    Dim objBook  As Excel.Workbook
   
    Set objExcel = CreateObject("excel.application")
    objExcel.Visible = False
    Set objBook = objExcel.Workbooks.Open(FitxerOrigen)
    objBook.SaveAs FileName:=FitxerDesti, FileFormat:=xlHtml, ReadOnlyRecommended:=False, CreateBackup:=False
    objBook.Close False
    objExcel.Quit
0
Comment
Question by:arapahoe
  • 5
  • 4
  • 2
  • +2
14 Comments
 
LVL 10

Expert Comment

by:dij8
ID: 7069938
Is Excel installed on the IIS server?  Does the IIS server have the right permissions set?  I have never tried an excel object but maybe the folder running this command needs execute permissions (as opposed to none or script).
0
 

Author Comment

by:arapahoe
ID: 7070846
this folder have 'Scripts and Executables' permissions
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7072463
Could very well be a version difference of Excel, as soon as you have a different version of Excel installed on the server as on the development environment, you are likely to get errors like this..

Let me know, and I'll see if I can help...

Max.
0
 

Author Comment

by:arapahoe
ID: 7072465
only have a one version off the office 2000 installed in my server.

Thanks
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7072482
And what is installed on the development environment??

The way I understand it, is that you are having a lower version of Excel installed on the development machine.

As far as I know, Excel 2000 is called in a different way, the dll for that is different then that of the older version, and therefor the call to that object would be different. I'm not sure, but I think it was:

Set objExcel = CreateObject("excel9.application")

The error 429, means that the application cannot find the dll, and therefor cannot instantiate the object you request it to instantiate.

If I were you, I'd give this a look...

Max.
0
 

Author Comment

by:arapahoe
ID: 7072501
The developer environment is the IDE of the Visual Basic 6.0 (sp5)

The createobject("excel.application") work fine when is issued by the user in the ide of visual basic.

Only not work if it is executed inside a cgi (this is started by IIS)
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7072507
I mean....what version of Excel is installed on the development environment???

If the versions are the same there should be no problem getting the Active-X to work from inside IIS either...

Max.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:arapahoe
ID: 7072515
Office 2000....but inside IIS not work!!! :-((

Maybe is a IIS protection?
0
 
LVL 19

Accepted Solution

by:
DreamMaster earned 300 total points
ID: 7072550
Just try creating a simple ASP page, that does exactly the same, it might show you the mistake you are making better...

If all of that doesn't provide any more help...maybe I should just have a look at the object and see if I can help you then...

Good luck,
Max.
0
 
LVL 18

Expert Comment

by:bruno
ID: 7146319

Hello,

This question has been open for quite a while now and needs to be wrapped up.

EXPERTS: If any of the experts could come back and post any suggestions as to how they feel this could be wrapped up (delete, 0 PAQ, award points, etc), I'm sure the moderators would appreciate it.  If you feel you deserve points here, but don't care to respond, the question might very well get DELETED.

ASKER:  Please return and finalize this question.  Abandoning a question is in violation of the member agreement.

Please do NOT accept this comment as an answer, as I am simply trying to alert those involved that the question is still open.

Thank you,

BRUNO
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7146453
I gave as much help as I possibly could, in the end got no more response. I feel my efforts are worth the points..

Max.
0
 
LVL 10

Expert Comment

by:dij8
ID: 7146748
I think there is enough information here to keep it in the PAQ list.  And agree that Max should get the points.
0
 
LVL 18

Expert Comment

by:bruno
ID: 7182528
Hello,

This question seems to have been abandoned.

I have put it on a cleanup list for Community Support with the following suggestion.

<suggestion>
    Points to DreamMaster
</suggestion>

arapahoe, if you feel your question was not answered, you can post a request in Community Support and ask them to refund your points.
     http://www.experts-exchange.com/commspt/

EXPERTS: If anyone has a problem with the suggestion, please leave a comment for the moderators.

Thanks!


BRUNO
-- EE cleanup volunteer


posted by: Dan's Cleanup Helper Tool ver 1.01
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7182941
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I put codes from jsfiddle.net into my website? 4 47
Dragable hours and minutes clock using  javascript 15 81
MySQL database data submission 7 58
Animated .jpg? 13 57
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now