Referencing A Text String (URL) In A Power Query

New Contributor

I am using Excel and Quick Base.  Quick Base allows querying data via URL. I have successfully set up and run a query in Excel Power Query from our Quick Base database.


Here is an example of what that Power Query looks like:


Source = Csv.Document(Web.Contents("}"
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
#"Promoted Headers"


Instead of hard coding the entire text string for the URL, I want to build up the text string (parameterize it) in an Excel cell so that I can reference various values in the spreadsheet, then pull that string into the query source statement above.

I have found some online resources for building a Power Query to reference a specific cell on a spreadsheet.

How do I then reference that parameter correctly in this Source statement?

3 Replies
Best Response confirmed by JonInPDX (New Contributor)


If that's one cell parameter, you may name such cell


query it and use as parameter

    GetURL = Excel.CurrentWorkbook(){[Name="URLstring"]}[Content][Column1]{0},
    Source = Csv.Document(Web.Contents(GetURL),[Delimiter=","]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
    #"Promoted Headers"


If there are few parameters, idea is the same but you organize you parameter into Excel table, query it, combine value into one string and use to access web resource.

@Sergei Baklan Fantastic! That worked perfectly. Thank you!

@JonInPDX , you are welcome