• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

[PowerQuery - Append] include columns with filename

thangvc91

New Member
hi All,
I would like to append 4 excel files at the same folder (append all content of sheet named "append_sheet").
is there any way to have a new column that shows filename in the output file?

example: consolidate 4 files excel , each file have sheet "append_sheet", in the output file iwould like to have a column which can show the source file.
If can dynamic by input source file in a cell on sheet , that would be great.
 
In the attached a set of queries purely from using the user interface; there was no coding done at all.
I had 3 files in a folder (C:\Users\Public\Documents\Chandoo47611), each had 3 sheets, one of which was called append_sheet.
There were no proper Excel tables in the workbooks being queried.
The result of the query is the table in the attached where you can see which workbook each row comes from in column A.
There were no other files in that folder, but if there were they'd be included (or could be filtered out).

If you can't do much with the attached then supply a sample workbook of the files being queried and perhaps the workbook which does the querying too.

If can dynamic by input source file in a cell on sheet , that would be great.
It would be useful to have more detail on this (one cell - 4 workbooks?). Again, it'd be useful to see the querying workbook.
 

Attachments

  • Chandoo47611.xlsx
    19.7 KB · Views: 0
Back
Top