KNr = Worksheets("Tabelle1").Range("A1").Value
ActiveWorkbook.Queries.Add Name:="Table 0", Formula:= _
"let" & Chr(13) & "" & Chr(10) & " Quelle = Web.Page(Web.Contents(""http://report.lan/reportsrv/de81/kunde/dhist/" & KNr & ".htm""))," & Chr(13) & "" & Chr(10) & " Data0 = Quelle{0}[Data]," & Chr(13) & "" & Chr(10) & " #""Höher gestufte Header"" = Table.PromoteHeaders(Data0, [PromoteAllScalars=true])," & Chr(13) & "" & Chr(10) & " #""Geänderter Typ"" = Table.TransformColumnTypes(#""Höher gestufte Header"",{{""Auftr.Dat."", type text}, {""Auftr.Num."", type tex" & _
"t}, {""War.gr."", type text}, {""Mat.Nr."", type text}, {""Materialbez."", type text}, {""Materialbez._1"", type text}, {""Menge"", type text}, {""Brutto"", type text}, {""Rab %"", type text}, {""Nettopr. PE"", type text}, {""PE"", type text}, {""Kond.art"", type text}, {""Pr.li."", type text}, {""Pos."", type text}, {""V.weg"", type text}, {""A.ADM"", type text}, {" & _
"""Fakt.dat."", type date}, {""Faktura"", Int64.Type}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Geänderter Typ"""
ActiveWorkbook.Worksheets.Add
|