Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 14th, 2004, 05:59 AM
Friend of Wrox
 
Join Date: Nov 2003
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.
 
Old May 14th, 2004, 07:20 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old May 14th, 2004, 08:16 AM
Friend of Wrox
 
Join Date: Nov 2003
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.
 
Old June 3rd, 2004, 03:30 AM
Registered User
 
Join Date: May 2004
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..






Similar Threads
Thread Thread Starter Forum Replies Last Post
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 08:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.