简体   繁体   English

使用存储在Excel Power Query中单元格中的URL

[英]Use a URL stored in a cell in an Excel Power Query

I have a spreadsheet with a list of clients in column A and in column BI have their websites. 我有一个电子表格,其中包含A列中的客户列表,BI列中有其网站。 I'm using a drop down list to select a specific client which will then display various bits of data on another sheet. 我正在使用一个下拉列表来选择一个特定的客户端,然后它将在另一张纸上显示各种数据。

I'm looking to use the Power Query tool to access their websites in excel. 我正在寻找使用Power Query工具访问Excel中的网站。 However I can't work out how to select the url from this list as it always asks me to type in the address rather than give it a cell to look up. 但是我不知道如何从此列表中选择URL,因为它总是要求我输入地址,而不是给它查找单元格。

Column A| Column B
abc ltd | http://www.abcltd.com
def ltd | http://www.defltd.com
ghi ltd | http://www.ghiltd.com

You can explicitly connect to a web page with Web.Contents and then read the content with something like Web.Page or Excel.Workbook . 您可以使用Web.Contents显式连接到网页,然后使用Web.PageExcel.Workbook类的内容读取内容。 If your table is named Table , then you can add a column which connects to the web site like this: 如果您的表名为Table ,那么您可以添加一个连接到网站的列,如下所示:

= Table.AddColumn(Table, each Web.Page(Web.Contents([Column B]))

You will need to define privacy levels for the websites. 您将需要定义网站的隐私级别。 If you trust all of the websites in the column, you can also disable privacy levels for the workbook. 如果您信任该列中的所有网站,则还可以禁用工作簿的隐私级别。

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

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