Solved

office automation - any redistributable S/W packages?

Posted on 2003-11-05
16
309 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
 

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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