p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > ADO.NET
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 January 14th, 2004, 07:04 PM
Authorized User
Points: 313, Level: 6
Points: 313, Level: 6 Points: 313, Level: 6 Points: 313, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy Data from Access.mdb into an Excel Spreadshee

Dear Users,

I have attached a piece of code which copies an Access Table onto an Excel Spreadsheet. Does anyone know how to ?

1) Get the information to code to skip the first couple of rows then input the information from the Database.

2) How does one copy the information onto a specific spreadsheet; this code opens a new worksheet. But I would like to update an existing worksheet?

**********************************
 Dim cnSrc As New ADODB.Connection()
    Dim TDate As New System.DateTime(2004, 11, 30)
    Dim WKTemp As String

    TDate = Today()
    WKTemp = "Ross" & " " & TDate
    Dim num_Copied As Long

    cnSrc.Open("Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\DATA\ACCESS\13FloorEquipment.mdb;")

    cnSrc.Execute("SELECT * INTO [Excel 8.0;DATABASE=C:\DATA\ACCESS\13FloorEquipment.xls].[" & WKTemp & "] FROM [Requests]")

     cnSrc.Close()
*******************************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old January 15th, 2004, 06:38 PM
Friend of Wrox
Points: 1,099, Level: 12
Points: 1,099, Level: 12 Points: 1,099, Level: 12 Points: 1,099, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 0 Times in 0 Posts
Default

check out the code at http://www.greggriffiths.org/webdev/both/excel/ that and the links there should give you a start
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old January 23rd, 2004, 10:46 AM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: Reading, Berkshire, United Kingdom.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alex_read
Default

You might want to also lookup the CopyFromRecordset method()

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
Copy of IceCream.mdb dezmond2 BOOK: Beginning Access VBA 2 July 5th, 2007 05:02 PM
Copy data to Excel gjackson Visual Basic 2005 Basics 1 July 1st, 2007 08:56 AM
Copy data from Excel to open HTML form Bartje Excel VBA 1 September 29th, 2006 05:02 AM
Copy data from webpage to excel using vba kg8299 Excel VBA 0 April 5th, 2006 04:51 AM
copy table from one access .mdb to another jimsparks Classic ASP Databases 2 July 26th, 2003 06:22 PM



All times are GMT -4. The time now is 12:52 AM.


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