Sorry this is in Danish:
let
Kilde = Folder.Files("C:\Users\CHRISTM\Downloads\Solcelle"),
#"Skjulte filer er filtreret1" = Table.SelectRows(Kilde, each [Attributes]?[Hidden]? <> true),
#"Aktivér brugerdefineret funktion1" = Table.AddColumn(#"Skjulte filer er filtreret1", "Transformér fil fra Solcelle", each #"Transformér fil fra Solcelle"([Content])),
#"Omdøbte kolonner1" = Table.RenameColumns(#"Aktivér brugerdefineret funktion1", {"Name", "Source.Name"}),
#"Fjernede andre kolonner1" = Table.SelectColumns(#"Omdøbte kolonner1", {"Source.Name", "Transformér fil fra Solcelle"}),
#"Udvidet tabelkolonne1" = Table.ExpandTableColumn(#"Fjernede andre kolonner1", "Transformér fil fra Solcelle", Table.ColumnNames(#"Transformér fil fra Solcelle"(Eksempelfil))),
#"Ændret type" = Table.TransformColumnTypes(#"Udvidet tabelkolonne1",{{"Source.Name", type text}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}, {"Column16", type text}, {"Column17", type text}, {"Column18", type text}, {"Column19", type text}, {"Column20", type text}, {"Column21", type text}, {"Column22", type text}, {"Column23", type text}, {"Column24", type text}, {"Column25", type text}, {"Column26", type text}, {"Column27", type text}, {"Column28", type text}, {"Column29", type text}, {"Column30", type text}, {"Column31", type text}, {"Column32", type text}, {"Column33", type text}, {"Column34", type text}, {"Column35", type text}, {"Column36", type text}, {"Column37", type text}, {"Column38", type text}, {"Column39", type text}, {"Column40", type text}, {"Column41", type text}, {"Column42", type text}, {"Column43", type text}, {"Column44", type text}, {"Column45", type text}, {"Column46", type text}, {"Column47", type text}, {"Column48", type text}, {"Column49", type text}, {"Column50", type text}, {"Column51", type text}, {"Column52", type text}, {"Column53", type text}, {"Column54", type text}, {"Column55", type text}, {"Column56", type text}, {"Column57", type text}, {"Column58", type text}, {"Column59", type text}, {"Column60", type text}, {"Column61", type text}, {"Column62", type text}, {"Column63", type text}, {"Column64", type text}, {"Column65", type text}, {"Column66", type text}, {"Column67", type text}, {"Column68", type text}, {"Column69", type text}, {"Column70", type text}, {"Column71", type text}, {"Column72", type text}, {"Column73", type text}, {"Column74", type text}, {"Column75", type text}, {"Column76", type text}, {"Column77", type text}, {"Column78", type text}, {"Column79", type text}, {"Column80", type text}, {"Column81", type text}, {"Column82", type text}, {"Column83", type text}, {"Column84", type text}, {"Column85", type text}, {"Column86", type text}, {"Column87", type text}, {"Column88", type text}, {"Column89", type text}, {"Column90", type text}, {"Column91", type text}, {"Column92", type text}, {"Column93", type text}, {"Column94", type text}, {"Column95", type text}, {"Column96", type text}, {"Column97", type text}, {"Column98", type text}, {"Column99", type text}, {"Column100", type text}, {"Column101", type text}, {"Column102", type text}, {"Column103", type text}, {"Column104", type text}, {"Column105", type text}, {"Column106", type text}, {"Column107", type text}, {"Column108", type text}, {"Column109", type text}, {"Column110", type text}, {"Column111", type text}, {"Column112", type text}, {"Column113", type text}, {"Column114", type text}, {"Column115", type text}, {"Column116", type text}, {"Column117", type text}, {"Column118", type text}, {"Column119", type text}, {"Column120", type text}, {"Column121", type text}, {"Column122", type text}, {"Column123", type text}, {"Column124", type text}, {"Column125", type text}, {"Column126", type text}, {"Column127", type text}, {"Column128", type text}, {"Column129", type text}, {"Column130", type text}, {"Column131", type text}, {"Column132", type text}, {"Column133", type text}, {"Column134", type text}, {"Column135", type text}, {"Column136", type text}, {"Column137", type text}, {"Column138", type text}, {"Column139", type text}, {"Column140", type text}, {"Column141", type text}, {"Column142", type text}, {"Column143", type text}, {"Column144", type text}, {"Column145", type text}, {"Column146", type text}, {"Column147", type text}, {"Column148", type text}, {"Column149", type text}, {"Column150", type text}, {"Column151", type text}, {"Column152", type text}, {"Column153", type text}, {"Column154", type text}, {"Column155", type text}, {"Column156", type text}, {"Column157", type text}, {"Column158", type text}, {"Column159", type text}, {"Column160", type text}, {"Column161", type text}, {"Column162", type text}, {"Column163", type text}, {"Column164", type text}, {"Column165", type text}, {"Column166", type text}, {"Column167", type text}, {"Column168", type text}, {"Column169", type text}}),
#"Fjernede kolonner" = Table.RemoveColumns(#"Ændret type",{"Column1", "Column3"}),
#"Filtrerede rækker" = Table.SelectRows(#"Fjernede kolonner", each ([Column2] <> null and [Column2] <> "1" and [Column2] <> "address")),
#"Fjernede kolonner1" = Table.RemoveColumns(#"Filtrerede rækker",{"Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column35", "Column37", "Column58", "Column59", "Column60", "Column61", "Column62", "Column63", "Column64", "Column65", "Column66", "Column67", "Column68", "Column69", "Column70", "Column71", "Column72", "Column73", "Column74", "Column75", "Column76", "Column77", "Column78", "Column79", "Column80", "Column81", "Column82", "Column83", "Column84", "Column85", "Column86", "Column87", "Column88", "Column89", "Column90", "Column91", "Column92", "Column93", "Column94", "Column95", "Column96", "Column97", "Column98", "Column99", "Column100", "Column101", "Column102", "Column103", "Column104", "Column105", "Column106", "Column107", "Column108", "Column109", "Column110", "Column111", "Column112", "Column113", "Column114", "Column115", "Column116", "Column117", "Column118", "Column119", "Column120", "Column121", "Column122", "Column123", "Column124", "Column125", "Column126", "Column127", "Column128", "Column129", "Column130", "Column131", "Column132", "Column133", "Column134", "Column135", "Column136", "Column137", "Column138", "Column139", "Column140", "Column141", "Column142", "Column143", "Column144", "Column145", "Column146", "Column147", "Column148", "Column149", "Column150", "Column151", "Column152", "Column153", "Column154", "Column155", "Column156", "Column157", "Column158", "Column159", "Column160", "Column161", "Column162", "Column163", "Column164", "Column165", "Column166", "Column167", "Column168", "Column169", "Source.Name"}),
#"Omdøbte kolonner" = Table.RenameColumns(#"Fjernede kolonner1",{{"Column4", "Ppv(W)"}, {"Column5", "Vpv1(V)"}}),
#"Fjernede kolonner2" = Table.RemoveColumns(#"Omdøbte kolonner",{"Vpv1(V)", "Column7", "Column9", "Column11", "Ppv(W)", "Column6", "Column8", "Column10", "Column12", "Column13", "Column14", "Column15", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column36"}),
#"Omdøbte kolonner2" = Table.RenameColumns(#"Fjernede kolonner2",{{"Column38", "Epv1Today(kWh)"}}),
#"Fjernede kolonner3" = Table.RemoveColumns(#"Omdøbte kolonner2",{"Column39", "Column41", "Column43", "Column45", "Column47", "Column49", "Column51", "Column53", "Column55", "Column57"}),
#"Omdøbte kolonner3" = Table.RenameColumns(#"Fjernede kolonner3",{{"Column40", "Epv2Today(kWh)"}, {"Column42", "EpvToday(kWh)"}, {"Column44", "Edischarge1Today(kWh)"}, {"Column46", "Echarge1Today(kWh)"}, {"Column48", "EacChargeToday(kWh)"}, {"Column50", "EacToday(kWh)"}, {"Column52", "EtoUserToday(kWh)"}, {"Column54", "EtoGridToday(kWh)"}, {"Column56", "ElocalLoadToday(kWh)"}}),
#"Filtrerede rækker2" = Table.SelectRows(#"Omdøbte kolonner3", each ([Column2] <> "Time")),
#"Filtrerede rækker1" = Table.SelectRows(#"Filtrerede rækker2", each true),
#"Omdøbte kolonner4" = Table.RenameColumns(#"Filtrerede rækker1",{{"Column2", "Time"}}),
#"Opdel kolonne efter afgrænser" = Table.SplitColumn(#"Omdøbte kolonner4", "Time", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Time.1", "Time.2"}),
#"Ændret type1" = Table.TransformColumnTypes(#"Opdel kolonne efter afgrænser",{{"Time.1", type date}, {"Time.2", type time}}),
#"Omdøbte kolonner5" = Table.RenameColumns(#"Ændret type1",{{"Time.1", "Date"}, {"Time.2", "Time"}}),
#"Ændret type2" = Table.TransformColumnTypes(#"Omdøbte kolonner5",{{"Echarge1Today(kWh)", type number}, {"Epv1Today(kWh)", type number}, {"Epv2Today(kWh)", type number}, {"EpvToday(kWh)", type number}, {"Edischarge1Today(kWh)", type number}, {"EacChargeToday(kWh)", type number}, {"EacToday(kWh)", type number}, {"EtoUserToday(kWh)", type number}, {"EtoGridToday(kWh)", type number}, {"ElocalLoadToday(kWh)", type number}})
in
#"Ændret type2"
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.