Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2003, 07:26 AM
Registered User
 
Join Date: Jun 2003
Location: Jacksonville, FL, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel but no Office

I'm fairly new to VB, so please bear with me on this.
I have written a VB6 batch job that reads a Sql Server table and creates an Excel spreadsheet.
It works great on my desktop, but as soon as I move it down to a W2k server, it abends with a "Activex component can't create object" message.
The obvious is the W2K server does not have Office installed.

This leads to my question:

Is it possible to create an Excel spreadsheet from VB when MS Office has not been installed?


William R. Algie
Reply With Quote
  #2 (permalink)  
Old June 6th, 2003, 08:59 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

yes.. but you have to include the excel object in the installer of your program..
it's weight about 8 meg.



Gonzalo Bianchi
Reply With Quote
  #3 (permalink)  
Old June 6th, 2003, 09:41 AM
Registered User
 
Join Date: Jun 2003
Location: Jacksonville, FL, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi gbianchi;

Is the Excel object that you speak of in the Office folder where I find Excel.exe.

I have created an install package that contains Excel.exe and Excel8.olb and still get the Activex message.

The code that gives the message is;

    Dim fso As scripting.FileSystemObject
    Dim hHeading As String
    Dim X As Integer

    Set oXL = CreateObject("Excel.Application")
    Set oXL.Workbooks.Add
    oWB.Sheets(1).Name = "Report_Extract"

    MsgBox ("Excel Version: " & oXL.Version)


Could you give me a little more information on how I go about using the Excel object.

Thanks

William R. Algie
Reply With Quote
  #4 (permalink)  
Old June 6th, 2003, 11:11 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

try this link...

http://msdn.microsoft.com/library/de...tml/offaut.asp

it has all you need...

Gonzalo Bianchi
Reply With Quote
  #5 (permalink)  
Old June 8th, 2003, 09:42 PM
Registered User
 
Join Date: Jun 2003
Location: Milwaukee, WI, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Walgie,

I have an app that uses Access and fails on boxes without Access installed. I haven't read the 123 page article gbianchi pointed you to, but I did come across this page, http://support.microsoft.com/support.../q208/7/30.asp near it. It sounds like you have to pony up $799 for the Developers version of Office to re-distribute the run-time files. If I'm wrong and there is a free solution, please let me know.

Nick
Reply With Quote
  #6 (permalink)  
Old June 9th, 2003, 03:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

There is an Excel ODBC driver you can use instead. It just treats the spreadsheets like db tables so you can add stuff using the normal SQL syntax of CREATE TABLE, INSERT etc. I don't have any links to hand, but a search for 'Excel ODBC driver' should get you started.
Reply With Quote
  #7 (permalink)  
Old June 9th, 2003, 09:56 AM
n/a
Guest
 
Posts: n/a
Default

If the app is written in vb and uses the access engine, just install mdac from microsoft and the jet service packs. The station does not have to have access installed to run a vb program.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't have Office Access flashmanTom BOOK: Beginning VB.NET Databases 1 May 13th, 2008 04:10 AM
Excel VBA and Office Clipboard tcarnahan Excel VBA 3 April 4th, 2006 11:41 AM
uploading ms excel without office on server vauneen Classic ASP Components 0 April 13th, 2005 09:16 AM
Out of Office patriciacardoza BOOK: Access 2003 VBA Programmer's Reference 1 August 25th, 2004 04:25 PM
Is this Office Automation with COM? Aaron Edwards ASP.NET 1.0 and 1.1 Basics 1 July 9th, 2004 02:12 PM



All times are GMT -4. The time now is 02:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.