Multiple csv file importer

Vbanoob98

Board Regular
Joined
Sep 13, 2019
Messages
128
Hello,

I am trying to come up with a macro that imports multiple csv files to different sheets and using the name of the file as the sheet name.

I also need to be able to select the delimiter and also Consecutive delimiters. I have found 2 variants, one that imports multiple files but does not keep the name of the file and one that keeps the name but doesnt have the ability to set consecutive delimiters.

I also need to be able to choose the folder in which the files are

https://www.extendoffice.com/documents/excel/3230-excel-import-multiple-csv-files.html

Thanks again for your help, this forum is great​
 
Last edited:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi,

IT-guys like it difficult, but your link is crossing all limits.

An easy way:
Code:
Sub T_1()
With Application.FileDialog(msoFileDialogFilePicker)
    .AllowMultiSelect = True
    .InitialFileName = "c:\temp\*.csv"
    If .Show Then
        For Each f In .SelectedItems
            Sheets.Add , Sheets(Sheets.Count), , f
        Next f
    End If
End With
End Sub

regards
 
Upvote 0
Thank you! The only thing that I can't figure is how to set the delimiter as a semicolon for example. Otherwise the data is all in the wrong places
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,619
Members
449,238
Latest member
wcbyers

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