Forum Discussion

jozsacruz's avatar
jozsacruz
Frequent Visitor
5 years ago
Solved

Sharepoint Folder

Hello, 

 

Just wanted to ask how I can merge excel files in power query. I have connected to my sharepoint folder and will be adding excel files weekly. These files remain relatively similar but sometimes may change from time to time. The only change is new columns will be added. 

 

Do I have to enter power query editor to add in the new excel file and append each time a new file is added or is there a way to automate it? Thank you! 

    • Use the SharePoint Folder Connector
    • Filter to the files you want to use. You can do this in the Path column, or the file name, or however you want.
    • After you have the files showing you want, click the Combine icon.
      •  

    Thereafter, all files meeting that same filter critera will be added to the query.

    You say the files will remain "relatively similar." They are either the same or they are not. If they are not, the query can fail unless you had some more sophisticated M code to handle those differences, including the addition or removal of columns from the first file in that folder. The query will use that file as a model for the rest and it expects them to be the same format. Row count doesn't matter. Column count, names, etc. does matter.

1 Reply

  • edhans's avatar
    edhans
    Community Champion
    • Use the SharePoint Folder Connector
    • Filter to the files you want to use. You can do this in the Path column, or the file name, or however you want.
    • After you have the files showing you want, click the Combine icon.
      •  

    Thereafter, all files meeting that same filter critera will be added to the query.

    You say the files will remain "relatively similar." They are either the same or they are not. If they are not, the query can fail unless you had some more sophisticated M code to handle those differences, including the addition or removal of columns from the first file in that folder. The query will use that file as a model for the rest and it expects them to be the same format. Row count doesn't matter. Column count, names, etc. does matter.