Solved

office automation - any redistributable S/W packages?

Posted on 2003-11-05
16
323 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 57
SSRS expression Issue finding a string 10 76
Prevent user closing word document opened with VB6 6 73
how to Classify of email (pdf attachments) 7 32
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

813 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

10 Experts available now in Live!

Get 1:1 Help Now