et
Source1 = Folder.Files(Excel.CurrentWorkbook(){[Name="CheminFichierA"]}[Content]{0}[Column1]),
Source2 = Folder.Files(Excel.CurrentWorkbook(){[Name="CheminFichierB"]}[Content]{0}[Column1]),
Source3 = Folder.Files(Excel.CurrentWorkbook(){[Name="CheminFichierC"]}[Content]{0}[Column1]),
Source = Table.Combine({Source1, Source2, Source3}),
//Je fais le filtre ci-dessous, et prend les fichiers commençant par "Ent"
Filtr = Table.SelectRows(Source, each Text.StartsWith([Name], "Ent")),
Transform = Table.TransformColumns(Filtr, { "Content", each Excel.Workbook(_, true )}),
Expand1 = Table.ExpandTableColumn(Transform, "Content", {"Data", "Kind"}, {"Data", "Kind"}),
Selections = Table.SelectRows(Expand1, each ([Kind] <> "DefinedName") and Text.Contains([Extension], "xls")) [[Name],[Data]],
Expand2 = Table.ExpandTableColumn(Selections, "Data", Table.ColumnNames(Selections[Data]{0}), Table.ColumnNames(Selections[Data]{0})),
ModType = Table.TransformColumnTypes(Expand2,{{"Date", type date}}),
ExtNom = Table.TransformColumns(ModType, {{"Name", each Text.BeforeDelimiter(_, "."), type text}})
in
ExtNom