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

January 14th, 2004, 07:04 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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()
*******************************
|

January 15th, 2004, 06:38 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
check out the code at http://www.greggriffiths.org/webdev/both/excel/ that and the links there should give you a start
|

January 23rd, 2004, 10:46 AM
|
|
Authorized User
|
|
Join Date: Jul 2003
Location: Reading, Berkshire, United Kingdom.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You might want to also lookup the CopyFromRecordset method()
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |