2

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?
TylerH
  • 20,799
  • 66
  • 75
  • 101
Andrea Gail
  • 31
  • 1
  • 4
  • 2
    For your first question, see this: https://stackoverflow.com/questions/26989279/how-can-i-reference-a-cells-value-in-a-power-query – Alexis Olson Feb 21 '18 at 19:51

1 Answers1

4

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.

Mike Honey
  • 14,523
  • 1
  • 24
  • 40
  • Is the solution for doing step 1 with an External Source (`SharePoint.Files...`) similar enough to edit into the answer here (if you know it) or do you think it'd be worth asking as a separate question? – TylerH Feb 06 '19 at 20:06