Xpath 如何使用importXML将结果限制为1

Xpath 如何使用importXML将结果限制为1,xpath,web-scraping,google-sheets,google-sheets-formula,google-sheets-importxml,Xpath,Web Scraping,Google Sheets,Google Sheets Formula,Google Sheets Importxml,我使用importXML搜索包含“当前价格”的类“current”。 使用此代码,它将返回与“当前”类在网站上存在3次相同的结果3次 =importxml("https://www.currys.co.uk/gbuk/tv-and-home-entertainment/televisions/televisions/lg-55sm8200pla-55-smart-4k-ultra-hd-hdr-led-tv-with-google-assistant-10191769-pdt.html", "/

我使用importXML搜索包含“当前价格”的类“current”。 使用此代码,它将返回与“当前”类在网站上存在3次相同的结果3次

=importxml("https://www.currys.co.uk/gbuk/tv-and-home-entertainment/televisions/televisions/lg-55sm8200pla-55-smart-4k-ultra-hd-hdr-led-tv-with-google-assistant-10191769-pdt.html", "//div//strong[contains(@class, 'current')]")


是否有一种简单的方法将我的搜索限制为1个结果,这样它就不会与下一行的数据重叠?

当然,您可以像这样使用
索引:

=INDEX(IMPORTXML("https://www.currys.co.uk/gbuk/tv-and-home-entertainment/televisions/televisions/lg-55sm8200pla-55-smart-4k-ultra-hd-hdr-led-tv-with-google-assistant-10191769-pdt.html", 
 "//div//strong[contains(@class, 'current')]"), 1, 1)