Closed Thread
Results 1 to 9 of 9

Excel with Access datasource

  1. #1
    Registered User
    Join Date
    01-05-2010
    Location
    Manitoba, Canada
    MS-Off Ver
    Office 2007
    Posts
    16

    Question Excel with Access datasource

    Hi All,

    This question is also posted in the excel forum. I just thought that perhaps this particular problem might be solved in Access using query. Anyways, here it is...

    I am tasked with creating a report using Excel with data coming from Access database. I am able to connect Excel to the Access database and view the data as-is. However, the data needs to be presented in such a way quite different from how the Access table is structured.

    Here's simplified version of how the access table looks like:
    NO___PRJNAME____YEAR__AMORT
    001__Project A__2008__100,000
    001__Project A__2009__200,000
    001__Project A__2010__100,000
    002__Project B__2007__400,000
    002__Project B__2008__800,000
    002__Project B__2009__800,000
    002__Project B__2010__800,000
    002__Project B__2011__400,000

    Here's what the excel document should look like:
    NO____PRJNAME_____2007______2008______2009______2010______2011___
    001___Project A_____________100,000___200,000___200,000__________
    002___Project B___400,000___800,000___800,000___800,000___400,000

    The data in excel is refreshed automatically everytime it is opened to reflect any changes made to the data in the Access database. Is this possible at all? By the way I'm using Office 2007. Any help would be greatly appreciated.

    - corix

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Excel with Access datasource

    Hi corix,

    Welcome to the forum!

    You can build an Access "CrossTab query" to manipulate the data into the layout you need, then connect your Excel spreadsheet to the Crosstab query as the data source instead of the table.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    01-05-2010
    Location
    Manitoba, Canada
    MS-Off Ver
    Office 2007
    Posts
    16

    Smile Re: Excel with Access datasource

    Hi ConneXionLost,

    Thanks for the quick reply. I'm not familiar with cross-tab query but I will look into it. I'll post again soon if I get stuck somewhere.
    Again, thanks for the help.

    - corix

  4. #4
    Registered User
    Join Date
    01-05-2010
    Location
    Manitoba, Canada
    MS-Off Ver
    Office 2007
    Posts
    16

    Re: Excel with Access datasource

    Hi, I'm back. So I created a crosstab query, saved the file and closed Access. Now when I try to look for the crosstab query in Excel (Data/Get External Data/From Access), all I see are tables and views inside my database. I don't see the crosstab query. What am I missing here?

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Excel with Access datasource

    Small hiccup; Excel only sees tables and "Select" queries as data sources. Not a problem, just create a select query that shows all the fields in your Xtab query, then use the select query as the data source.

  6. #6
    Registered User
    Join Date
    01-05-2010
    Location
    Manitoba, Canada
    MS-Off Ver
    Office 2007
    Posts
    16

    Re: Excel with Access datasource

    Thanks for bearing with me ConneXionLost. Ok, so I created a select query with all the data I need for the crosstab.. then I used it as the datasource. So far so good.. What's the next step?

  7. #7
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Excel with Access datasource

    Hi corix,

    Sorry. In answering your post, my response was directed at improving the presentation of the data, thus the crosstab query suggestion. Unfortunately, I'm not familiar with the VBA required to open an Access database from an Excel workbook and "automatically refresh" your data.

    Perhaps you should start a new thread in the Excel Programming forum with the title "Refreshing Excel spreadsheet from an Access Database using VBA", or something similar.

    As before, link to this thread so others will know the history of your question.

    Cheers,

  8. #8
    Registered User
    Join Date
    01-05-2010
    Location
    Manitoba, Canada
    MS-Off Ver
    Office 2007
    Posts
    16

    Re: Excel with Access datasource

    Oh... That's just too bad.. I was hoping my situation would not warrant any coding specially in VBA. But if that's the only way to accomplish what I'm trying to do then I guess I have no choice. Still I'm hoping you or somebody here will still come up with a different solution later on.. Preferably a simpler one
    Thanks again
    Last edited by corix; 01-06-2010 at 12:34 AM.

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel with Access datasource

    OP restarted thread in Excel forum. Thread closed.

Closed 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