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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
syasmin25
Helper V
Helper V

Importing multiple files from Sharepoint

Hello, 

I had a simple question. I am trying to import multiple Excel files from Sharepoint. They are all located in the same folder. I know how to combine, however I do not want to do that as the tables needs to be cleaned up a bit individually. I know how to get one file, however, I was wondering if there is anyway by which I can get multiple of them together? Please let me know.

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @syasmin25 ,

 

We can create three queries, make different clean steps on each query,  such as

Query_A:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_A = Source{[Name="File_A",#"Folder Path"="Folder"]}[Content],
    File_A_Content = Excel.Workbook(File_A),
    CleanStep1 = AAAAA,
    CleanStep2 = BBBBB
in
    CleanStep2

 

Query_B:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_B = Source{[Name="File_B",#"Folder Path"="Folder"]}[Content],
    File_B_Content = Excel.Workbook(File_B),
    CleanStep1 = CCCCC,
    CleanStep2 = DDDDD
in
    CleanStep2

 

Quer_C:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_C = Source{[Name="File_C",#"Folder Path"="Folder"]}[Content],
    File_C_Content = Excel.Workbook(File_C),
    CleanStep1 = EEEEE,
    CleanStep2 = FFFFF
in
    CleanStep2

 

Then we can create another query to combine them

let
  Source = Table.Combine({Query_A,Query_B,Query_C})
in
  Source

 

Or we can also write all  of them in single query, such as following:

let
  Table_A = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_A = Source{[Name="File_A",#"Folder Path"="Folder"]}[Content],
              File_A_Content = Excel.Workbook(File_A),
              CleanStep1 = AAAAA,
              CleanStep2 = BBBBB
            in
              CleanStep2,
  Table_B = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_B = Source{[Name="File_B",#"Folder Path"="Folder"]}[Content],
              File_B_Content = Excel.Workbook(File_B),
              CleanStep1 = CCCCC,
              CleanStep2 = DDDDDD
            in
              CleanStep2,
  Table_C = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_C = Source{[Name="File_C",#"Folder Path"="Folder"]}[Content],
              File_C_Content = Excel.Workbook(File_C),
              CleanStep1 = EEEEE,
              CleanStep2 = FFFFF
            in
              CleanStep2,
  Combine_Table = Table.Combine({Table_A,Table_B,Table_C})
in
  Combine_Table

 

If you have any other questions, please kindly ask here and we will try to resolve it.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-lid-msft
Community Support
Community Support

Hi @syasmin25 ,

 

We can create three queries, make different clean steps on each query,  such as

Query_A:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_A = Source{[Name="File_A",#"Folder Path"="Folder"]}[Content],
    File_A_Content = Excel.Workbook(File_A),
    CleanStep1 = AAAAA,
    CleanStep2 = BBBBB
in
    CleanStep2

 

Query_B:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_B = Source{[Name="File_B",#"Folder Path"="Folder"]}[Content],
    File_B_Content = Excel.Workbook(File_B),
    CleanStep1 = CCCCC,
    CleanStep2 = DDDDD
in
    CleanStep2

 

Quer_C:

let
    Source = SharePoint.Files("URL", [ApiVersion = 15]),
    File_C = Source{[Name="File_C",#"Folder Path"="Folder"]}[Content],
    File_C_Content = Excel.Workbook(File_C),
    CleanStep1 = EEEEE,
    CleanStep2 = FFFFF
in
    CleanStep2

 

Then we can create another query to combine them

let
  Source = Table.Combine({Query_A,Query_B,Query_C})
in
  Source

 

Or we can also write all  of them in single query, such as following:

let
  Table_A = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_A = Source{[Name="File_A",#"Folder Path"="Folder"]}[Content],
              File_A_Content = Excel.Workbook(File_A),
              CleanStep1 = AAAAA,
              CleanStep2 = BBBBB
            in
              CleanStep2,
  Table_B = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_B = Source{[Name="File_B",#"Folder Path"="Folder"]}[Content],
              File_B_Content = Excel.Workbook(File_B),
              CleanStep1 = CCCCC,
              CleanStep2 = DDDDDD
            in
              CleanStep2,
  Table_C = let
              Source = SharePoint.Files("URL", [ApiVersion = 15]),
              File_C = Source{[Name="File_C",#"Folder Path"="Folder"]}[Content],
              File_C_Content = Excel.Workbook(File_C),
              CleanStep1 = EEEEE,
              CleanStep2 = FFFFF
            in
              CleanStep2,
  Combine_Table = Table.Combine({Table_A,Table_B,Table_C})
in
  Combine_Table

 

If you have any other questions, please kindly ask here and we will try to resolve it.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors