Forum Discussion
How to combine multiple sheets in a workbook into one sheet?
- Sep 25, 2020
If data in all the sheets in the workbook is formatted as an Official Excel Table, you may create a blank Power Query to combine all the data into one table called MasteData.
let Source = Excel.CurrentWorkbook(), #"Filtered Rows" = Table.SelectRows(Source, each not Text.Contains([Name], "Master")), #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"}), #"Expanded Content" = Table.ExpandTableColumn(#"Removed Columns", "Content", {"Column1", "Column2", "Column3"}, {"Column1", "Column2", "Column3"}), #"Changed Type" = Table.TransformColumnTypes(#"Expanded Content",{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", Int64.Type}}) in #"Changed Type"
For more details, refer to the attached.
If you insert a new sheet in this file, convert the data in that new sheet into an Official Excel Table and then go to Master Sheet, right click inside the green table and choose Refresh and this table would then be updated and would contain the data from the newly added sheet.
If data in all the sheets in the workbook is formatted as an Official Excel Table, you may create a blank Power Query to combine all the data into one table called MasteData.
let
Source = Excel.CurrentWorkbook(),
#"Filtered Rows" = Table.SelectRows(Source, each not Text.Contains([Name], "Master")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"}),
#"Expanded Content" = Table.ExpandTableColumn(#"Removed Columns", "Content", {"Column1", "Column2", "Column3"}, {"Column1", "Column2", "Column3"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Content",{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", Int64.Type}})
in
#"Changed Type"
For more details, refer to the attached.
If you insert a new sheet in this file, convert the data in that new sheet into an Official Excel Table and then go to Master Sheet, right click inside the green table and choose Refresh and this table would then be updated and would contain the data from the newly added sheet.
Subodh_Tiwari_sktneer Thanks a lot
- Subodh_Tiwari_sktneerOct 01, 2020Silver Contributor
You're welcome!