+ Reply to Thread
Results 1 to 6 of 6

Importing / updating most recent datafile

  1. #1
    Registered User
    Join Date
    12-11-2006
    Posts
    5

    Importing / updating most recent datafile

    I will be recieving daily .csv files that I want to import into my model as efficiently and accurately as possible.

    The two files are EXTRACT1_date and EXTRACT2_date, such that I will have a library that looks like this:

    EXTRACT1_052108
    EXTRACT2_052108
    EXTRACT1_052208
    EXTRACT2_052208
    EXTRACT1_052308
    EXTRACT2_052308 etc.

    Is there a way I can set the data import wizard to pick the most recent files and import them on launch?

    I am not sure if it matters, but I will be opening EXTRACT1 on the first tab of my workbooks and EXTRACT2 on the second. Another workbook will be linked to this worksheets and will contain the model logic.

    Thank you for looking!
    Last edited by Commander; 05-22-2007 at 06:54 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    A couple of questions...

    Do you mean most recent files?

    How is your date formated - what does the 5 refer to?
    Martin

  3. #3
    Registered User
    Join Date
    12-11-2006
    Posts
    5
    Yes, I did mean most recent file.

    The 5 stands for May. The file may be 05 (for May), but I am not sure at this point. Actually, I could probably have the files named anything I want if that would help the process any.

    Thanks,
    C
    Last edited by Commander; 05-22-2007 at 06:49 PM.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    So this means then that you want the most recent file determined by the date time stamp as opposed to the file name?

  5. #5
    Registered User
    Join Date
    12-11-2006
    Posts
    5
    I hadn't considered the timestamp on the file. The timestamp will roughly correspond to the file name so if there is a way to use timestamp, that would be fine. I get the files every 24 hours as a .txt files that is pipe ( | ) delimited.

    Thanks again,
    Colin

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Try this macro

    Please Login or Register  to view this content.
    You'll need to adjust it for your folder location and sheet names.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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