+ Reply to Thread
Results 1 to 6 of 6

Open zip folders and use data from the csv file in them

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Open zip folders and use data from the csv file in them

    So to sketch the picture highlevel.

    Lets say I have a folder in which I have 10 zip files.
    All these zip files contain 1 csv file.

    Now I want to loop thru all these 10 zipfiles, open them, open the csv file (comma delinited) and copy the data in a new excel sheet.
    So the new excel sheet collects all the data from the csv files (the all have the same columns) that are in the zip files.

    Then save the collection as 1 excel file.

  2. #2
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Open zip folders and use data from the csv file in them

    Ok I now found some code (Ron de Bruin) which somewhat is what I am looking for:

    Please Login or Register  to view this content.
    But I rather not need to select all the files first.
    (it gives an open file select box in which you manually select the files to unzip)

    It needs to go just thru all the zip's it comes accros.

    And I guess I always have to unzip them first to a temp folder and from there open each .csv file and then combine those into 1 xlsx file.
    Or could it be done in a loop?

  3. #3
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Open zip folders and use data from the csv file in them

    Apparently vba code to unzipped multiple zip files (without manually selecting them) in a folder to another folder is harder than I thought

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Open zip folders and use data from the csv file in them

    Perhaps this link could be of interest?

    https://www.get-digital-help.com/201...nd-subfolders/

    At the end of the macro code there is an excel file you could down load with macro installed. Have not tested this myself so I can't tell how efficient it is but at lest it seems that you only select the folder where the zip files are stored + a folder where the extracted file should be placed and macro will do the rest.

    Alf

  5. #5
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Open zip folders and use data from the csv file in them

    Thanks Alf! This looks very promising.
    Will need a bit tweeking to find to my needs but must be not to big of a problem

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Open zip folders and use data from the csv file in them

    You are welcome.

    Thanks for feedback and rep

    Alf

+ 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. VB Script to open multiple folders on HD & provide file property details.
    By LauraShepherd-Boyd in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2017, 12:23 AM
  2. Replies: 27
    Last Post: 06-15-2016, 01:05 PM
  3. VBA code to open folders and pdf file inside the folders
    By kirtesh250187 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2013, 03:17 AM
  4. Replies: 0
    Last Post: 04-15-2013, 06:54 AM
  5. VBA code for searching file through folders and sub folders
    By vikas189 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2012, 06:00 PM
  6. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  7. open file by searching root and sub folders
    By slipperyjim in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2009, 10:42 AM

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