Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    Exporting Sheets

    I have a CSV file which was downloaded and it containing several sheets

    I would like each sheet eatracted seperately and saved in folder called "download"

    Sheet1 to be extracted and saved in folder download as PETB.csv
    Sheet2 to be extracted and saved in folder download as piontb.csv
    Sheet3 to be extracted and saved in folder download as maintb.csv etc

    Once the initial code has been set up I can then do the rest


    Your assistance in this regard is most appreciated

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    I don't understand. A CSV will not contain "several sheets", it can only contain 1 sheet and that is how it is imported. If the file must be parsed into different worksheets, you will have to be very specific about how to do that...

    Steve

  3. #3
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Steve

    My apologies. It is an Xlsm workbook. All the sheets are to be exported to a folder called "Download". I only need columns A: D for each sheet to be copied/exported to folder "Download"

    foe eg Sheet1 is called ELMBO -I need this saved as Hotb.xlsm
    Sheet2 is named ELPortAl -I need this saved as PAtb.xlsm
    Sheet3 is named FOEL - I need this saved as easttb.xlsm etc

    Your assistance in this regard is most appreciated

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    As before I would do the actions with the macro-recorder on. The code should be easy to follow once the macro-recorder creates it. There are no loops required, just 3 similar actions.

    Steve

  5. #5
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Steve

    Thanks for getting back to me. I will try this. Another method that I may adopt is to open existing files and to copy the data from each of the sheet into the appropriate workbook instead of exporting and saving each of the sheets


    Howard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •