+ Reply to Thread
Results 1 to 11 of 11

Transforming Data for import into Access 2007

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Transforming Data for import into Access 2007

    Hello,

    I have countless .csv files in a folder which i want to import into access 2007.
    The structure of all files are the same, however in a difficult format for me to rearrange and import into Access 2007 where the access table will make sense.

    I have attached the .csv file

    I would like the data to look like the excel spreadsheet i have attached.

    Cheers,
    Attached Files Attached Files
    Last edited by squirrely; 10-02-2013 at 02:45 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Transforming Data for import into Access 2007

    Do you have code or a method to get the table like that?

    The only way I can think of doing it would be to use VBA file I/O to read the file line by line and extract the data.

    If you were going to do that then you could miss out Excel and do it in Access, appending the data to a table.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    Hello Norie,

    No unfortunately i dont have a code to do that. I manually created that table to show how i would like data to look like.
    If it were possible to do this in access - that would be great..i dont know how to do this though...can you help?

  4. #4
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    Ignore this post an error
    Last edited by squirrely; 10-02-2013 at 02:44 PM.

  5. #5
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    Ignore this post - an error
    Last edited by squirrely; 10-02-2013 at 02:44 PM.

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Transforming Data for import into Access 2007

    Hi Squirrely,
    maybe something like this (in a first approximation)
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    The code works! It actually works! I put the code in a module within one of the .csv files and ran it. That is great!

    How would i implement this so it would look at each .csv file in a folder? and put the output into the excel spreadsheet?

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Transforming Data for import into Access 2007

    Have all csv the same data format?

  9. #9
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    Hi Nilem,

    Yes they do, the naming stucture of the file is the same also - just incrementing by date.

    E-01102012
    E-02102012
    E-03102012
    E-04102012

    and so on

    Regards,

  10. #10
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Transforming Data for import into Access 2007

    Ok, let's try
    it is assumed that you have a folder with csv files. Save this file (attached) to the folder.
    Open the xlsm file and press the green button.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    10-13-2012
    Location
    newcastle
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Transforming Data for import into Access 2007

    Hi Nilem,

    I will try this first thing tomorrow morning and update you on how this went. Many Thanks - update you tomorrow.

    Regards,

+ 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. Macro to import data from access to excel 2007
    By bongielondy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 09:17 AM
  2. Exporting Data from Excel 2007 to Access 2007 using VBA
    By gotnvols in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-27-2011, 01:54 PM
  3. VBA to Import data into Access 03
    By pdauction in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 11-17-2010, 05:51 AM
  4. How to import randomized Access data?
    By wrocman in forum Excel General
    Replies: 0
    Last Post: 06-03-2007, 06:24 PM
  5. Import Data From Access! Please Help!!
    By greenfalcon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2006, 03:28 PM

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