PDA

Click to See Complete Forum and Search --> : Excel automation without Excel installed [Resolved]


JeffLo
Mar 3rd, 2004, 12:31 AM
My program needs to use ActiveX to call MSExcel to open an Excel file and run a macro. However, the MS office was uninstalled from user's computers because considering cost. After uninstalling, part of the users encounter error as below:
<ActiveX component can't create object.>

The error occurs when program try to run below line:

Set xls_Application = New Excel.application


I have already included the Excel 8.0 Object Library in the installation package. And I checked on the client computer, the Library file - Excel8.old still exists under c:\windows\system32\.

The error still appear even I run the setup again and again.

Pls kindly advise how I can fix it.
Many thanks in advance

si_the_geek
Mar 3rd, 2004, 04:05 AM
There is absolutely no way you will get it to work without having Excel installed. It is called ActiveX Automation because you are automating an ActiveX object (Excel); if Excel isnt there, you cannot automate it.

The Object Library is just a reference to the objects within Excel that can be used, and your program uses this to work out how to communicate with Excel. In your current situation, your program knows how to communicate, but has nothing to talk to.

It's basically like trying to drive a car when you have its instruction book, but not the car itself.

JeffLo
Mar 4th, 2004, 01:37 AM
si_the_geek,

Many thanks for your input!
I will use another way to replace the current function.
Thanks!!

Jeff