Forum Discussion
Auto-append Google Sheets worksheets for monthly data
- 3 years ago
You can easily load them all in a single query.
Since I don't have your worksheet, here's a Google sheet that has tabs including Week 1 through Week 4:
https://docs.google.com/spreadsheets/d/1z88d0BCV7jDOyPouLc5TzYjAqY9u_p8ZnTmDkaABACE/edit#gid=0When you load it into the query editor, delete all except the first applied step and it should look like this:
Filter the [name] column to remove the sheets you don't want and expand the data column... and that's about it other than cleaning up rows and columns you don't want.
Here is what the whole query could look like:
let Source = GoogleSheets.Contents("https://docs.google.com/spreadsheets/d/1z88d0BCV7jDOyPouLc5TzYjAqY9u_p8ZnTmDkaABACE/edit#gid=0"), #"Filtered Rows" = Table.SelectRows(Source, each ([name] <> "Inputs")), #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"name", "Data"}), #"Expanded Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6"}, {"Exercise", "Purpose", "Set Scheme", "Weight", "Percentage", "Comments"}), #"Filtered Rows1" = Table.SelectRows(#"Expanded Data", each List.Contains({"0".."9"}, Text.Start([Set Scheme],1))) in #"Filtered Rows1"
You can easily load them all in a single query.
Since I don't have your worksheet, here's a Google sheet that has tabs including Week 1 through Week 4:
https://docs.google.com/spreadsheets/d/1z88d0BCV7jDOyPouLc5TzYjAqY9u_p8ZnTmDkaABACE/edit#gid=0
When you load it into the query editor, delete all except the first applied step and it should look like this:
Filter the [name] column to remove the sheets you don't want and expand the data column... and that's about it other than cleaning up rows and columns you don't want.
Here is what the whole query could look like:
let
Source = GoogleSheets.Contents("https://docs.google.com/spreadsheets/d/1z88d0BCV7jDOyPouLc5TzYjAqY9u_p8ZnTmDkaABACE/edit#gid=0"),
#"Filtered Rows" = Table.SelectRows(Source, each ([name] <> "Inputs")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"name", "Data"}),
#"Expanded Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6"}, {"Exercise", "Purpose", "Set Scheme", "Weight", "Percentage", "Comments"}),
#"Filtered Rows1" = Table.SelectRows(#"Expanded Data", each List.Contains({"0".."9"}, Text.Start([Set Scheme],1)))
in
#"Filtered Rows1"- Anonymous3 years agoNot applicable
This looks like exactly what I need (including the ability to exclude an inputs sheet). I'll try it out and report back!