Solved

office automation - any redistributable S/W packages?

Posted on 2003-11-05
16
330 Views
Last Modified: 2008-02-26
Our client machine doen't have any Microsoft office tools (Excel, Word,..). The application we are developing needs MS Excel. Are there any free redistributable S/W packages which can be deployed on client machine?

When the code to access Excel object is executed on the client machine the following error is coming:
COM object with CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not registered.

Can anybody help me what to do to work with Excel object without installing Excel on client machine..

thanx in advance...

0
Comment
Question by:ewizz
  • 5
  • 4
  • 4
16 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9688332
What kind of access do you need?  Are you just trying to pull information from an XLS file?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9688455
if you are trying to use standard Office Automation, then Excel MUST be installed on the target PC.  There are no work-arrounds.

What are you using the Excel object for?

AW
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9688475
You can access worksheets in Excel as a recordset using ADO or DAO.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:ewizz
ID: 9688646
We have two applications. In application1 we are generating xls file. The generated xls is used in application2. At the client place, application1 will be in one machine wherein Office is not installed and application2 is installed in another machine wherein Office is installed.

Though Excel is not present in machine1 we can always generate tab delimited xls using FileSystem Object. But problem comes when the above tab delimited xls is used in application2. Because application2 expects Workbook.

Is there any wayout to generate Workbook kind of xls instead of a flat file?

TheLearnedOne,
How can we use ADO for creating xls. Some sample code would help. Does ADO work even if Office is not present?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 75 total points
ID: 9688716
Yes, you would use the OLEDB Provider for Jet, which gets installed with MDAC.  

I don't have a lot of time for sample code, but start here with the connection string:

OLE DB Provider for Excel
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForExcel

Have you worked with ADO before?
0
 

Author Comment

by:ewizz
ID: 9700887
We tried with ADO for filling Excel file in application1. It is solving our problem to some extent. The only problem remains is: We tried with placing a dummy excel template physically in the client machine. Opened it as database through ADO. After writing our calcuated data to the database (Excel) we are saving the excel with some other name. i.e. the dummy file is always required with this type of code.

Is it not possible to make use of Excel as database without creating any dummy file?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9721925
I don't understand what you mean by "dummy template".
0
 

Author Comment

by:ewizz
ID: 9747276
We just created one file with .xls extension and placed in non-Office machine. Everytime we are opening it through ADO and saving it as another .xls. For opening the excel database through ADO we are using that dummy file, which is not good at client's place in the long run.

That is why I am asking if there is any way out without using such intermediate file for ADO.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9747771
creating a file with an XLS extension DOES NOT make it an Excel file.  The EXTENSION is NOT what determines what kind of file it is.  That is determined by the internal structure of the file itself, and the internal structure of an EXCEL file is a propietary design owned by Microsoft.  

I can create a free text file, with any text whatsoever, in NotePad and save it as MySample.xls.  This does NOT make it an Excel file, but rather a Texct file with the extension .XLS.  These are NOT the same thing.

AW
0
 

Author Comment

by:ewizz
ID: 9752789
That is true. I completely agree with AW.

As you can see my question is related to that only. Though the dummy file is not true Excel I created it with .xls inorder to open with ADO.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9754252
what does a file extension of  .XLS have to do with ADO?  the two are completely independent.

AW
0
 

Author Comment

by:ewizz
ID: 9840842
Can anyone give the steps to open and write some content to an xls file through ADO?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9840861
never had to go that route.  All of our customers have Office installed, so trying to work-around has NEVER been an issue, and never will be. Our major customer - US Air Force Headquarters at the Pentagon, in MARRIED to MS Office as their primary application tool, so it will never be a problem.  Sorry but  can't be of any assistance on this.

AW
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

828 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