+ Reply to Thread
Results 1 to 2 of 2

How to copy a database table to Excel spreadsheet?

  1. #1
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    How to copy a database table to Excel spreadsheet?

    Assume I have VBA connected to database already.

    How to write VBA code (code efficient, hope not copy one record at a time) to copy the whole database table(including field names) into a excel spreadsheet?

    Thanks.
    Last edited by VAer; 01-21-2017 at 10:54 PM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to copy a database table to Excel spreadsheet?

    Assuming you know ADODB is how you are already connected to your database. Also assuming you have the sql

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help with Excel spreadsheet / database
    By RivkaB in forum Excel General
    Replies: 1
    Last Post: 06-23-2015, 05:59 PM
  2. Macro Copy From Invoice To Table Database
    By johnreid7477 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2014, 04:13 AM
  3. Excel VBA - to copy table from Excel to Lotus Notes Database
    By Tapyr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2013, 10:43 AM
  4. Excel VBA - to copy table from Excel to Lotus Notes Database
    By Tapyr in forum Access Tables & Databases
    Replies: 0
    Last Post: 02-07-2013, 10:43 AM
  5. Customer Database Excel Spreadsheet
    By omnri in forum Excel General
    Replies: 2
    Last Post: 10-11-2011, 10:34 PM
  6. macro to copy web table to excel spreadsheet
    By pcfacile in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2009, 12:13 PM
  7. Copy data from excel to a defined table in another spreadsheet
    By DSTDIVA3 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1