Multiple csv file importer

Vbanoob98

Board Regular
Joined
Sep 13, 2019
Messages
109
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:

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Fennek

Active Member
Joined
Nov 21, 2016
Messages
278
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
 

Vbanoob98

Board Regular
Joined
Sep 13, 2019
Messages
109
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
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,868
Messages
5,507,824
Members
408,647
Latest member
gazmoz17

This Week's Hot Topics

Top