[英]ImportXML XPath URL in Google Sheets
我剛剛開始使用Google表格,並且想知道是否可以使用importxml
XPath來獲取鏈接
在此屏幕快照中,您可以看到主錦標賽子菜單下的可點擊鏈接,該鏈接每周都會更改。 目前,我每周手動復制粘貼,您可以在下面鏈接的工作表的a16單元格中找到它
這是我試圖獲取XPath的XPath(我對此完全是個菜鳥),並試圖將其構建為a14單元格中的公式,但失敗了。
我也想知道是否有可能在鏈接之間例如在鏈接之間進行連接:
https://www.tennisexplorer.com/cincinnati/2019/atp-men/
https://www.tennisexplorer.com/cincinnati/2018/atp-men/
https://www.tennisexplorer.com/cincinnati/2017/atp-men/
我想更改鏈接之間的年份,但無法弄清楚:(
鏈接到具有編輯權限的工作表:) https://docs.google.com/spreadsheets/d/16Y6q2tw26c-nbmqIrXiQ_ZhuDc48oAzkXvOl78kVy00/edit?usp=sharing
在鏈接使用中創建可選年份:
="https://www.tennisexplorer.com/cincinnati/"&B1&"/atp-men/"
要獲得電影電影,您可以:
=ARRAYFORMULA(QUERY(TO_TEXT(IMPORTXML(
"https://www.tennisexplorer.com/cincinnati/2019/atp-men/",
"//td[@class='t-name']")), "select Col2 where Col1 is null limit 1", 0))
然后整個公式將是:
="https://www.tennisexplorer.com/"&
ARRAYFORMULA(QUERY(TO_TEXT(IMPORTXML(
"https://www.tennisexplorer.com/live/",
"//td[@class='t-name']")), "select Col2 where Col1 is null limit 1", 0))&"/"&B1&"/atp-men/"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.