Multiple csv file importer

Vbanoob98

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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

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
112
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,106,307
Messages
5,510,514
Members
408,792
Latest member
S_s_s

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top