Forum Discussion

jsuttmann's avatar
jsuttmann
Helper I
5 years ago
Solved

Add Excel Data Source with Additional Columns

In Power Query, I'm using a SharePoint document library as my data source with multiple Excel files, all of which have the same columns, so Power Query automatically merged the data from these Excel ...
  • lbendlin's avatar
    5 years ago

    You can see the M code in the Advanced Editor in Power Query (right click on any query, click "Advanced Editor".  If you used the official merge option there will be a new section with a ingestion function and a sample file reference. Walk through the generated code, and find the place where it mentions the sample file (for the headers).  Usually it is the first file in your list.

     

    That may actually give you an in.  When you list the items in the sharepoint folder, sort them in a way that newer files come first. Then the merge code will pick up the new structure (and gracefully merge the older files even if they are missing the new column).