let
Source = Excel.CurrentWorkbook(){[Name="V_1580_DUREES"]}[Content],
SupprEspaces = Table.TransformColumns(Source,{{"Column1", Text.Trim, type text}}),
Filtre = Table.SelectRows(SupprEspaces, each ([Column1] <> "") and not Text.StartsWith([Column1], "--") and not Text.StartsWith([Column1], "NOUVEAU")),
GroupBy = Table.Group(Filtre, {"Column1"}, {{"tbl" , each _}} ,GroupKind.Local , (s,c) => Number.From(Text.Start(c[Column1] , 4) = "DATE")),
AddRec = Table.AddColumn(GroupBy, "Records", each
[Date = Text.AfterDelimiter([tbl][Column1]{1}, " ", {1, RelativePosition.FromEnd}),
Ref produit = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{3}, " ", ".")) & Text.Trim(Text.BetweenDelimiters([tbl][Column1]{4}, " ", ".")),
Numero de campagne = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{7}, " ", ".")),
Numero du batch = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{6}, " ", ".")),
Temps du cycle = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{9}, " ", ".")),
Temps de chargement = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{10}, " ", ".")),
Temps de chauffe = Text.Trim(Text.BetweenDelimiters([tbl][Column1]{11}, " ", "."))])[[Records]],
Expand = Table.ExpandRecordColumn(AddRec, "Records", {"Date", "Ref produit", "Numero de campagne", "Numero du batch", "Temps du cycle", "Temps de chargement", "Temps de chauffe"}, {"Date", "Ref produit", "Numero de campagne", "Numero du batch", "Temps du cycle", "Temps de chargement", "Temps de chauffe"}),
TypeDate = Table.TransformColumnTypes(Expand, {{"Date", type datetime}}, "fr-FR"),
TypeNumber = Table.TransformColumnTypes(TypeDate,{{"Ref produit", type number}, {"Numero de campagne", type number}, {"Numero du batch", type number}, {"Temps du cycle", type number}, {"Temps de chargement", type number}, {"Temps de chauffe", type number}})
in
TypeNumber