Google Spreadsheet importXML功能

时间:2013-04-08 21:58:23

标签: google-sheets google-docs

<xml>
    <category date="5/21/2012">
        <item>14</item>
    </category>
</xml>

在单元格A1中,我有以下功能:

=ImportXML("http://www.site.com/file.xml", "//@date")

并成功加载名称为“date”的所有属性值。

现在在B1中我想加载具有A1日期的“项目”。我知道以下是错误的,但我想知道我要去哪里:

=ImportXML("http://www.site.com/file.xml", "//@date["&A&ROW()&"]/item")

提前谢谢。

1 个答案:

答案 0 :(得分:0)

解决方案:

=ImportXML("http://www.site.com/file.xml", "//category[@date='"&INDIRECT("A"&ROW())&"']/item")
相关问题