+ Reply to Thread
Results 1 to 6 of 6

Use of Excel to pull data from database daily, posting new data below older data

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation Use of Excel to pull data from database daily, posting new data below older data

    Okay. So here's what I am trying to do (obviously ficticious names):

    There is a database ("Motherload") that houses some records (29 fields in each record) that is updated on a daily bases (except for weekends, holidays, and the first/last business day of the month). I want to have excel go into this database, pull all of the information in the database and paste it in a single excel spreadsheet (ResourceEater). I will be doing this daily, and I want the information I am pulling to go directly below the information that was pulled the day prior. The rest of it (sorting, etc.) is easy and I can handle that macro. I don't know if I need to go the DAO route, or if there is a simpler way. The problem doesn't seem so difficult, but I the data I am going to attempt to pull is extremely important and if I mess up, my boss will kill me.

    I haven't drafted any code yet, and would greatly appreciate any direction you can steer me in.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Use of Excel to pull data from database daily, posting new data below older data

    Hi,

    Wich kind of database are you connecting to, good thing to know when you choose method to connect with.

    Steffen Thomsen

  3. #3
    Registered User
    Join Date
    08-06-2011
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Use of Excel to pull data from database daily, posting new data below older data

    My apologies. I am pulling this from a Microsoft Access 2003 database. Is that what you were wanting to know?

  4. #4
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Use of Excel to pull data from database daily, posting new data below older data

    Hi again,

    Then im afraid i cant help, havent worked with acces databases, only mysql.

    But i think you should look into the DAO thing.

    Steffen Thomsen

  5. #5
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Use of Excel to pull data from database daily, posting new data below older data

    Go to Data -> Import and set up a data connection.

    http://office.microsoft.com/en-us/ex...001183132.aspx

  6. #6
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    Re: Use of Excel to pull data from database daily, posting new data below older data

    Hi
    .
    This seems to work on my box.
    .
    Notes:
    . Uses ADO not DAO
    . Tested under Excel 2007 but modifies Provider if not Excel 2007
    . Should be able to pop the code below into Excel 2003 but may have
    missed something
    . Some code needs work to make more industrial strength
    HTH
    regards
    John
    Please Login or Register  to view this content.
    Note:
    Change This line
    sProvider = "Microsoft.Jet.OLEDB.4.0"
    To this line
    sProvider = "Microsoft.Jet.OLEDB.4.0;"
    .
    Should work either way but have not tested in Excel 2003
    Last edited by JohnM3; 08-09-2011 at 10:22 AM. Reason: Adding Semicolon

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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