Combine CSV's from Folder

Craigc3814

Board Regular
Joined
Mar 7, 2016
Messages
217
I have about 10-15 CSV files stored on a network folder that I want to combine. When I try to do so it is throwing this error

DataFormat.Error: There were more columns in the result than expected.
Details:
Count=7

I believe this is because there are now commas on the csv file. The database I am downloading from exports it as a CSV file but its really just an .xlsx (it does not give me the option to export any other way).

I know I can go in and convert each file to .xlsx and make it work but it kind of ruins the automation portion.

I have been searching for about 2 hours with no fix. Does anyone have any ideas?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The database I am downloading from exports it as a CSV file but its really just an .xlsx
What are you basing that statement on?
I only ask because by default, Microsoft sets Excel as the default program to open CSV files (which I absolutely hate that they do this!).
So I just want to make sure that you aren't saying this because you are going out to Windows Explorer and double-clicking on the file, and it is opening it in Excel (does not necessarily mean that it is an Excel file).
The true test is to see what it looks like if you open it with a Text Editor like NotePad or WordPad. If it looks like a legible text file, then it is not an Excel file. If it really is an Excel file, when you go to open it up with a Text Editor, it will look like a bunch of goobledy-gook.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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