简体   繁体   English

Excel Power Query:某些单元格中的参数值

[英]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? 我可以对“ INGCODE”参数使用单元格值吗?
  2. Can I put the result of the power query in a determined cell? 我可以将功率查询的结果放在确定的单元格中吗?

For 1 - As per Alexis' comment, you need to first define a named range using Excel for your "cell value". 对于1-根据Alexis的评论,您需要首先使用Excel为“单元格值”定义一个命名范围。 Then the syntax is: 那么语法是:

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

(where rangeName is your named range). (其中rangeName是您的命名范围)。

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. 对于2-右键单击“工作簿查询”窗格中的查询,然后选择“加载到...”,然后在“选择数据应加载到的位置”下选择特定的工作表和单元格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM