为什么在电子表格中看不到使用“ importXML”导入的图像?

问题描述

  1. 我有这个网址 https://en.wikipedia.org/wiki/Golden_Gate_Bridge

  2. 我有这个公式

= IMPORTXML(A1,“ // * [@ id ='mw-content-text'] / div 1 / table 1 / tbody / tr [2] / td / a / img“)

  1. 我什么也没得到,甚至没有错误

enter image description here

你能帮忙知道为什么吗?

预先感谢

解决方法

要将图像实际导入到工作表中,您需要参考src并指出要导入图像。像这样:

=image(IMPORTXML(A1,"//td//a[@class='image']/img[contains(@alt,'Bridge')]/@src"))