importxml google电子表格 - " xml内容无法解析"新Google表格中的错误 [英] importxml google spreadsheet - "xml content cannot be parsed" error in NEW Google Sheets

查看:261
本文介绍了importxml google电子表格 - " xml内容无法解析"新Google表格中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从谷歌电子表格上的链接中获得一些细节。

链接: http://www.justdial.com/Gurgaon/Travel-Agents/ct-302



我想提取所有四行,即姓名,电话号码,地址和每个区块的类别。

我运行以下查询来提取名称,但它

  importxml(url,// span [@ class ='jcn'] / a)

Error =导入的xml内容无法解析

请帮助。

请注意,截至2015年6月18日此错误不再出现在新表格中!看起来像谷歌修复它! ;)






原始答案:

这已被证明是一个有趣的... ...
我无法解释为什么 - 谷歌表单中的奇怪bahaviours让我很困惑......



我已经测试了这一点,并且您的IMPORTXML()公式会返回en错误,正如您在Google表格中使用新Google表格所描述的那样,但不会在使用旧工作表



如何判断一张表是旧还是新:

新工作表有(当打开时)


  • 屏幕底部的绿色勾号

  • 选项卡/窗口标题栏上的绿色表单图标(favicon)
  • 主工具栏上的工具和帮助之间的附加组件菜单项
  • li>


旧工作表有(打开时)


  • 不打勾

  • 选项卡/窗口标题栏上的三色驱动器三角形图标(f avicon)
  • 否附加组件菜单项



您如何创建旧纸张? - 点击 g.co/oldsheets (这里是原始Google帮助文章



完成之后,编写您的IMPORTXML()的功能与您所描述的完全相同。

I was trying to get few details from a link on google spreadsheet.

Link: http://www.justdial.com/Gurgaon/Travel-Agents/ct-302

I want to extract all the four lines i.e. name, phone no, address and category of each block.

I ran the following query to extract the name but it was not working.

importxml(url, "//span[@class='jcn']/a")

Error = "imported xml content cannot be parsed"

Please help.

解决方案

EDIT: Please note, that as of 18/06/2015 this error no longer appears in New Sheets! Looks like google fixed it! ;)


ORIGINAL ANSWER:

This has proved to be an interesting one...
I cannot explain why - the odd bahaviours in google sheets have baffled me for a while...

I have tested this, and your IMPORTXML() formula returns en error, as described by you on google sheets using the "New Google Sheets", but not on sheets that have been created using the "old sheets"

How to tell if a sheet is "old" or "new":

New sheets have (when opened)

  • a green tick on the bottom of the screen
  • a green "sheet" icon on the tab / window title bar (favicon)
  • a "Add-ons" menu item on the main toolbar between "Tools" and "Help"

Old sheets have (when opened)

  • no tick
  • a 3-coloured "drive" triangle icon on the tab / window title bar (favicon)
  • no "Add-ons" menu item

How do you create an Old-Sheet? - Click g.co/oldsheets (here is the original google help article)

Once you've done that, write your IMPORTXML() function exactly as you described

这篇关于importxml google电子表格 - " xml内容无法解析"新Google表格中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆