p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 14th, 2004, 06:59 AM
Friend of Wrox
Points: 456, Level: 7
Points: 456, Level: 7 Points: 456, Level: 7 Points: 456, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default Writing Data to excel

Hi

Has anybody got some good examples for writing data to excel from a VB6 app?
I need to create a new workbook, name and create about 10+ sheets. Then write data to the sheets and save it and close it all in the background.
Would it be better to use ODBC(excel driver) to write the data and handle the sheets as tables? In previous apps I used DTS in SQLserver but this time it will not work for me.

Please point me in the right direction.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 14th, 2004, 08:20 AM
Friend of Wrox
Points: 4,754, Level: 29
Points: 4,754, Level: 29 Points: 4,754, Level: 29 Points: 4,754, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

I don't know what your best option is; you can use ODBC, however if you need custom formatting other than a standard CSV format, using the excel objects is fine.

Found something on the web that may help: http://www.it-faq.pl/data/misc1/EN-US/219/151.htm

Brian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 14th, 2004, 09:16 AM
Friend of Wrox
Points: 456, Level: 7
Points: 456, Level: 7 Points: 456, Level: 7 Points: 456, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Thanks! Thats perfect. Will play around with it but it seems this method will support any Excel VBA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old June 3rd, 2004, 04:30 AM
Registered User
Points: 39, Level: 1
Points: 39, Level: 1 Points: 39, Level: 1 Points: 39, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hai i understand ur prob
add excel9.olb library to ur vb library set
then using help for their methods and classes
u can easily got ur result.........
because recently i also developed
a system with same requirement.........bye..

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing too Excel w/out openning Excel? mike1reynolds Visual Studio Tools for Office 0 November 26th, 2007 08:47 PM
Reading and Writing data from Excel using VB? honey123 VB How-To 0 March 25th, 2006 08:48 AM
VBA writing an excel file toshesh BOOK: Access 2003 VBA Programmer's Reference 0 January 4th, 2006 07:08 AM
Writing Data to Excel from VB6 wildergoose Beginning VB 6 5 December 16th, 2004 07:27 AM
writing excel file in C doomurful C# 0 July 12th, 2004 09:55 AM



All times are GMT -4. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc