+ Reply to Thread
Results 1 to 5 of 5

Help Needed - Import multiple text files into excel using data from existing sheet.

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    Conwy
    MS-Off Ver
    Excel 2007
    Posts
    4

    Help Needed - Import multiple text files into excel using data from existing sheet.

    Hi, I'm completely new here (found site while searching for a answer to my question, have not found a answer but this seems to be the best place to look for one).

    I have a spreadsheet of products (27k of them!) that we are looking to use to generate a .csv file that will eventually populate a website however the data has been supplied with one issue, All the product descriptions are in separate .txt files.

    the data is layed out as:

    Supplier|Range|Description|Short Description|Picture File|Text File|

    In the |Text file| field are file names for the descriptions (For example 34894.txt) (Description field should probably be called name really)

    I'm looking for a solution that will let me run a macro over the sheet and populate a new column with the data from the .txt files.

    Does anyone know a simple and effective way of achieving our goal?

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Help Needed - Import multiple text files into excel using data from existing sheet.

    Hi
    In the text files that contain the Product Descriptions is there a field that matches a field (exactly) in the other files? If so you can import all the files into Excel in the normal way and then use VLOOKUP to pick up the Product descriptions using the matching fields from both files.
    Hope this helps.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    05-16-2013
    Location
    Conwy
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Help Needed - Import multiple text files into excel using data from existing sheet.

    Not really, the first one on the list would be :

    "AAK UK Limited Health & Hygiene - Dog - Supplements Fullolife Dog Calmer Liquid Supplement 200ml Fullolife Calmer 200ml X1 34894.jpg 34894.txt"

    The relevant 34894.txt file states
    "For dogs affected by stressful situations, a herbal food supplement, contains
    calming herbs, chamomile, ginger & valerian"

    So the only matching data is the filename of the .txt

  4. #4
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Help Needed - Import multiple text files into excel using data from existing sheet.

    Hi
    Unfortunately if there are no unique identifiers it will be difficult to match the two. If there is nothing sensitive in both files then can you post a sample of each and I will see if there is anything that can be done. Also can you confirm the following:
    1. Are there the same number of records in each file (for example if I were able to match record 1 in file 1 with record 1 in file 2 would that be correct).
    2. Are they both csv or text files?
    Look forward to hearing from you.
    Tony

  5. #5
    Registered User
    Join Date
    05-16-2013
    Location
    Conwy
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Help Needed - Import multiple text files into excel using data from existing sheet.

    I think I have found the solution to my own issue just testing it out now and checking the results,

    http://www.excelforum.com/excel-prog...filenames.html

    (different day different search query and the info slaps you in the face...)

    Basicly pulled the text files contents and filenames into excel using the above link, created a access DB to link the two based on the file name being in both excel sheets and ran a simply query from there and re-imported into excel. Probably not the best way but its a way I know... Sometimes its easier to do several little steps than one big one.

+ 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