Forum Discussion
user_none
4 years agoNew Member
M-editor using excel as a reference for web
hi! i have 50 similar web direction i need to scrap, the list is in a excel file in the M editor it look like this let
Origen = Web.Page(Web.Contents("https://es.finance.yahoo....
KNP
4 years agoSuper User
Hi user_none,
You may run into some challenges if they're only "similar" but you could try some variation of this...
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PczdCoIwGMbxe/EC3EcyNBghEhSEB9WZeSDbay7WpvsIvPsKrdPf8/BvmmQIYfRbhHplOiMgnbvB2lTYJ5qiDYDK+lqeq8PxtE8vNRqUD9bNuxGcspLwImNFlmGMbxFjyhamnLANpSzPf65MAPfqNCdygV7pj/A1t5qDKYIR8/+ljNBRQikf0QeQlbYeeHARlvkehbDxm+Ykads3", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [address = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"address", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Web.Page(Web.Contents([address]))),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each Table.First([Custom])),
#"Expanded Custom.1" = Table.ExpandRecordColumn(#"Added Custom1", "Custom.1", {"Data"}, {"Data"}),
#"Expanded Data" = Table.ExpandTableColumn(#"Expanded Custom.1", "Data", {"Date", "Open", "High", "Low", "Close*", "Adj Close**", "Volume"}, {"Date", "Open", "High", "Low", "Close*", "Adj Close**", "Volume"})
in
#"Expanded Data"
Just replace the source with your Excel data if it works for you.
Kim