VBA: Get all CSV file data from a folder in one excel sheet

jiobi

New Member
Joined
Feb 21, 2021
Messages
15
Office Version
  1. 2013
  2. 2011
  3. 2010
  4. 2007
Platform
  1. Windows
VBA: Get all CSV file data from a folder in one excel sheet named "atlas".

1. I have thousands of CSV files in a folder (only two-column data).
2. With VBA can I get the data in one excel sheet named "atlas" from the second row.
3. In the result sheet named "atlas" there are file names (In Column A/rows), and their headings are as per data appears vertically in the first column of CSV files.

Example CSV file:
BookTXTa with code2.xlsm
AB
1123#A
2London +
3
4
5Applepositive
Sheet5


Example output sheet "atlas"
BookTXTa with code2.xlsm
ABCDEFG
1Londonnone1*Apple
2filename1 +positive
3
4
5
6filename2
7filename3
atlas
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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