Forum Discussion
DieterD
2 years agoNew Member
Imported web csv data not able to transform
Hello When i import a CSV file from a siemens PLC data log, i have to do this by referer mode. The moment the file is imported i get the data split over columns split with fixed width. This is st...
Keezz
2 years agoHelper I
Thanks. The example file does not look very special.
And I was wondering: Do you want the file in 4 fixed columns to start with? And how did you get the second query?
Below the query if you just want all columns in the file as they are in the CSV file. You can refer to this querey for further processing...
If you just want the 4 fixed columns, then just forget about the second query.
let
Source = Csv.Document(
Web.Contents(
"http://"IP adres"/DataLogs?Path=/DataLogs/ResultDataFillingEquipment_ACF2.csv&Action=DOWNLOAD"
, [Headers=[Referer="http://"IP adress"/Portal/Portal.mwsl?PriNav=DataLogs"]]
)
, null // defaults to ","
, null // or replace by the number of colums you are interested in. // was {0, 117, 164, 185, 206}
, ExtraValues.Ignore // ignores columns you are not interested in (if any)
,1252 // Is the windows Encoding, I assume it is correct for your data
),
#"First Row as Headers" = Table.PromoteHeaders(Source) // was: #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}})
in
#"First Row as Headers"
Keezz
2 years agoHelper I
Sorry, I did not look very well. The second screenshot does not correspond to the second query.
The screenshot shows the HTML source of the web page by the look of it.
Is that your problem or is it (as I thought) the formatting of the data??