【发布时间】:2019-10-09 19:04:25
【问题描述】:
我正在写作,因为我在使用 Google 表格中的以下 IMPORTXML 公式时遇到了一些问题:
=IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml","/catalog/book[2]")
该公式在大多数情况下都可以正常工作,但大约每天一次它会中断,在加载公式时显示错误并因此给出#N/A。
解决方法是更改 URL 中的任何内容(即 http -> https 或 000webhostapp.com -> 000webhostapp.org),然后将其更改回来。基本上我认为解决方法是强制 Google 表格重新加载公式。
如果我使用这个公式,也会发生同样的事情:
=IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml")
以下公式没问题:
=IMPORTXML("https://gist.githubusercontent.com/Ram-N/5189462/raw/46db0b43ad7bf9cbd32a8932f3ab981bd4b4da7c/books.xml","/catalog/book[2]")
=IMPORTXML("https://gist.githubusercontent.com/Ram-N/5189462/raw/46db0b43ad7bf9cbd32a8932f3ab981bd4b4da7c/books.xml")
我认为问题是由于我正在使用的托管 (000webhostapp.com) 造成的,但我不知道为什么。有什么想法吗?
【问题讨论】:
-
我在
=importrange()和=indirect()上遇到过类似的问题。很难依赖这些功能。 -
@a-burge,我尝试了 player0 建议的解决方法,目前似乎可行。
标签: google-sheets hosting web-hosting google-sheets-formula google-sheets-importxml