Convert Several csv files into xlsx from different folders

kevin67

Board Regular
Joined
Feb 22, 2020
Messages
55
Office Version
  1. 2016
Platform
  1. Windows
Hello

I hope that someone can assist me on the following. I have several csv files from different folders and I need to delete duplicate records base on condition from column 1 and then convert them into xlsx. In the folders I will have both the csv and xlsx
The files name is the current date.csv in all the folders.

Any suggestion will be greatly appreciated.

Thank you
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Sounds like a fun job for Power Query (Get & Transform). Given you have Office 2016 that's native available.
  1. Start via the data ribbon: Get Data -> From File -> From Folder
  2. Browse and select folder
  3. Edit and combine files
  4. Filter on .csv (as you would in Excel)
  5. Filter out repeated headers
  6. Load as connection only
  7. Repeat for each folder
  8. Then finally Get Data -> Combine Queries -> Append
  9. Select all initial queries
  10. Load to Excel Table
All this is do-able with mouse clicks.
 
Upvote 0
Sounds like a fun job for Power Query (Get & Transform). Given you have Office 2016 that's native available.
  1. Start via the data ribbon: Get Data -> From File -> From Folder
  2. Browse and select folder
  3. Edit and combine files
  4. Filter on .csv (as you would in Excel)
  5. Filter out repeated headers
  6. Load as connection only
  7. Repeat for each folder
  8. Then finally Get Data -> Combine Queries -> Append
  9. Select all initial queries
  10. Load to Excel Table
All this is do-able with mouse clicks.
Thanks for your solution I am looking if this is possible in VBA because I have 15 folders to update
 
Upvote 0
FYI, obviously it is possible via VBA (but that's not me). Note that PQ runs a script (much like VBA) and if new files appear they get appended after a simple refresh.
 
Upvote 0
Sounds like a fun job for Power Query (Get & Transform). Given you have Office 2016 that's native available.
  1. Start via the data ribbon: Get Data -> From File -> From Folder
  2. Browse and select folder
  3. Edit and combine files
  4. Filter on .csv (as you would in Excel)
  5. Filter out repeated headers
  6. Load as connection only My Wegmans Connect
  7. Repeat for each folder
  8. Then finally Get Data -> Combine Queries -> Append
  9. Select all initial queries
  10. Load to Excel Table
All this is do-able with mouse clicks.


Thanks for this. This worked exactly as expected.
 
Upvote 0

Forum statistics

Threads
1,215,048
Messages
6,122,862
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top