Google 电子表格 ImportXML

时间:2021-06-24 09:58:56

标签: google-sheets google-sheets-formula spreadsheet

我正在尝试将本网站的最低产品价格输入到 Google 电子表格中。 https://multimedialne-centra.heureka.sk/homatics-dongle-q/

我不知道如何输入条件,但它应该是这样的: 从带有参数 <a> 的第一个 data-gtm-position-type="free" 中获取带有 SPAN

class="c-offer-v3__price" 的值

但是如何在电子表格中定义它?

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以为此使用 importxml。如果只是最低价格就可以了。为你然后你可以写:

=min(importxml("https://multimedialne-centra.heureka.sk/homatics-dongle-q/";"//span[@class="c-offer-v3__price u-bold u-delta"]"))

它从相应的 xpath 中获取所有值并提取其中最低的值。