Need Help - Dynamic URL from cell for Power Query from Web
1 TopicPower Query and dynamic URL
Hi, I have been beating my head against the wall for 2 weeks trying to figure out how to get the power query from web to work by updating a dynamic URL by data input from a cell. Below is the code I attempted to use in order to update web query based on dynamic URL from a cell. let Temp= Excel.CurrentWorkbook(){[Name="URL"]}[Content], URL= Temp{0}[Value], Source = Json.Document(Web.Contents(URL)), data = Source[data], #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"assists", "gamesPlayed", "goals", "playerName", "playerPositionCode", "points"}, {"assists", "gamesPlayed", "goals", "playerName", "playerPositionCode", "points"}), #"Reordered Columns" = Table.ReorderColumns(#"Expanded Column1",{"playerName", "playerPositionCode", "gamesPlayed", "goals", "assists", "points"}), #"Renamed Columns" = Table.RenameColumns(#"Reordered Columns",{{"playerName", "Player"}, {"playerPositionCode", "Pos"}, {"gamesPlayed", "GP"}, {"goals", "G"}, {"assists", "A"}, {"points", "Pts"}}) in #"Renamed Columns" Note all conversions and renaming columns was done previous to attempting to change the URL. Any help would be greatly appreciated. Thanks, MikeSolved39KViews0likes10Comments