Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

What is the best way to import from a folder containing multiple file types?

I want to import .CSV files from a folder and import Excel files from the same folder into the same PBI report and combine into the same table. Is this possible using the Get Data wizard?

 

If not, is there a way to exclude certain file types from an import before combining the contents into a single table?

1 ACCEPTED SOLUTION
anandav
Skilled Sharer
Skilled Sharer

Hi @Anonymous,

 

You can use the Get Data -> More.. -> Folder to select the folder you want to get teh files from.

 

When loading click Edit and go to Query Editor. You can filter files by Extension. So for the first query filter Extension by .xls to get Excel files.

Then repeat the process to Get Data from Folder and filter by Extension .csv to get the second query for csv files.

 FileFolderFiltering.jpg

Note that your columns need to be same type and count if you want to do this.

 

I haven't tried but am sure if the Excel and csv files have same number of columns and types you can use Append Query to combine them into a single table.

 

If this solves your problem please mark as the solution.

View solution in original post

2 REPLIES 2
anandav
Skilled Sharer
Skilled Sharer

Hi @Anonymous,

 

You can use the Get Data -> More.. -> Folder to select the folder you want to get teh files from.

 

When loading click Edit and go to Query Editor. You can filter files by Extension. So for the first query filter Extension by .xls to get Excel files.

Then repeat the process to Get Data from Folder and filter by Extension .csv to get the second query for csv files.

 FileFolderFiltering.jpg

Note that your columns need to be same type and count if you want to do this.

 

I haven't tried but am sure if the Excel and csv files have same number of columns and types you can use Append Query to combine them into a single table.

 

If this solves your problem please mark as the solution.

Anonymous
Not applicable

Thank you, @anandav! That was exactly what I needed.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.