Andrea Gail
Andrea Gail

Reputation: 31

Excel Power Query: Parameter value from certain cell

I have this power query (it works):

(INGCODE) => 

let
    Origine = Web.Page(Web.Contents("https://website/ProductDetails.aspx?id=IT01@@7000@@10@@"&(INGCODE))),
    #"Mantenute prime righe" = Table.FirstN(Origine,1),
    #"Rimosse altre colonne" = Table.SelectColumns(#"Mantenute prime righe",{"Caption"})
in
    #"Rimosse altre colonne"

The questions are:

  1. Can I use a cell value for the "INGCODE" parameter?
  2. Can I put the result of the power query in a determined cell?

Upvotes: 2

Views: 10111

Answers (1)

Mike Honey
Mike Honey

Reputation: 15037

For 1 - As per Alexis' comment, you need to first define a named range using Excel for your "cell value". Then the syntax is:

Excel.CurrentWorkbook(){[Name=rangeName]}[Content]{0}[Column1]

(where rangeName is your named range).

For 2 - Right-click the query in the Workbook Queries pane and choose Load To ... Then under "Select where the data should be loaded to" choose a specific worksheet and cell.

Upvotes: 5

Related Questions