Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

office automation - any redistributable S/W packages?

Posted on 2003-11-05
16
Medium Priority
?
347 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
13 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 300 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

772 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