let
Source = SharePoint.Files("https://XXX.sharepoint.com/personal/XXX_com/", [ApiVersion = 15]),
#"Linhas Filtradas" = Table.SelectRows(Source, each Text.Contains([Folder Path], "XPTO_FOLDER")),
Step2 = Table.SelectColumns(#"Linhas Filtradas", {"Content"}),
Step3 = Table.AddColumn(Step2, "Cols", each Excel.Workbook([Content])),
Step4 = Table.RemoveColumns(Step3, {"Content"}),
Step5 = Table.ExpandTableColumn(Step4, "Cols", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name", "Data", "Item", "Kind", "Hidden"}),
#"Linhas Filtradas1" = Table.SelectRows(Step5, each ([Kind] = "Sheet")),
#"Linhas Filtradas2" = Table.SelectRows(#"Linhas Filtradas1", each [Name] = "Dados"),
Step7 = Table.RemoveColumns(#"Linhas Filtradas2", {"Item", "Kind", "Hidden", "Name"}),
#"Data Expandida" = Table.ExpandTableColumn(Step7, "Data", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13"}, {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13"})
in
#"Data Expandida"
Step2 = Table.SelectColumns(#"Linhas Filtradas", {"Content"}),
Step3 = Table.AddColumn(Step2, "Cols", each Excel.Workbook([Content])),
Step4 = Table.RemoveColumns(Step3, {"Content"}),
Step5 = Table.ExpandTableColumn(Step4, "Cols", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name", "Data", "Item", "Kind", "Hidden"}),
#"Linhas Filtradas1" = Table.SelectRows(Step5, each ([Kind] = "Sheet")),
#"Linhas Filtradas2" = Table.SelectRows(#"Linhas Filtradas1", each [Name] = "Dados"),
Step7 = Table.RemoveColumns(#"Linhas Filtradas2", {"Item", "Kind", "Hidden", "Name"}),
#"Data Expandida" = Table.ExpandTableColumn(Step7, "Data", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13"}, {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13"})
in
#"Data Expandida"
No comments:
Post a Comment