如何在 Google 表格上使用 IMPORT 函数导入超链接 URL?
How to import hyperlink URLs using IMPORT functions on Google Sheets?
我正在尝试将最近收到的公报 table 导入此 spreadsheet。我使用以下公式来完成:
=query(IMPORTHTML("https://discover.sabinet.co.za/government_gazette_current_index", "table", 1), "Select Col2,Col3,Col4,Col5")
问题是当数据通过时,它排除了标题超链接到的 url。有什么方法可以让 url 也通过吗?
我尝试使用 IMPORTXML 公式来执行此操作但未成功:
`=IMPORTXML("https://discover.sabinet.co.za/government_gazette_current_index","//tr/td[1]/a/@href")`
我不完全是你想要的...试试这个:在 A1 = url,在 A2
=importxml(A1,"//@href[contains(.,'rgg_gnum')]")
在 B2
=arrayformula(if(A2:A="",,"https://discover.sabinet.co.za/"&A2:A))
https://docs.google.com/spreadsheets/d/11l2mDXV-hrcbZQmNf6Bs9AUgOCZg0r-Y0DVdZiacuB8/edit?usp=sharing
我正在尝试将最近收到的公报 table 导入此 spreadsheet。我使用以下公式来完成:
=query(IMPORTHTML("https://discover.sabinet.co.za/government_gazette_current_index", "table", 1), "Select Col2,Col3,Col4,Col5")
问题是当数据通过时,它排除了标题超链接到的 url。有什么方法可以让 url 也通过吗?
我尝试使用 IMPORTXML 公式来执行此操作但未成功:
`=IMPORTXML("https://discover.sabinet.co.za/government_gazette_current_index","//tr/td[1]/a/@href")`
我不完全是你想要的...试试这个:在 A1 = url,在 A2
=importxml(A1,"//@href[contains(.,'rgg_gnum')]")
在 B2
=arrayformula(if(A2:A="",,"https://discover.sabinet.co.za/"&A2:A))
https://docs.google.com/spreadsheets/d/11l2mDXV-hrcbZQmNf6Bs9AUgOCZg0r-Y0DVdZiacuB8/edit?usp=sharing