Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets ImportXML错误:无法分析导入的XML内容_Google Sheets_Google Sheets Formula_Array Formulas_Google Sheets Query_Google Sheets Importxml - Fatal编程技术网

Google sheets ImportXML错误:无法分析导入的XML内容

Google sheets ImportXML错误:无法分析导入的XML内容,google-sheets,google-sheets-formula,array-formulas,google-sheets-query,google-sheets-importxml,Google Sheets,Google Sheets Formula,Array Formulas,Google Sheets Query,Google Sheets Importxml,我想这个公式在某些页面上不能正常工作 我可以从下面的方法加载产品名称和价格,只是URL和类名不同 =IMPORTXML("https://mall.han-don.com/goods/goods_list.php?cateCd=001002","//*[@class='prdName']//text()") 但是,它没有加载“无法解析导入的XML内容”消息。请使用以下命令: =ARRAYFORMULA(REGEXEXTRACT(QUERY(SUBSTITUTE(ARRAY_CONSTRAIN(

我想这个公式在某些页面上不能正常工作

我可以从下面的方法加载产品名称和价格,只是URL和类名不同

=IMPORTXML("https://mall.han-don.com/goods/goods_list.php?cateCd=001002","//*[@class='prdName']//text()")
但是,它没有加载“无法解析导入的XML内容”消息。

请使用以下命令:

=ARRAYFORMULA(REGEXEXTRACT(QUERY(SUBSTITUTE(ARRAY_CONSTRAIN(IMPORTDATA(
 "https://mall.han-don.com/goods/goods_list.php?cateCd=001002"), 10000, 1), """", ), 
 "where Col1 contains 'strong class=prdName>'"), ">(.+)</strong"))

哇,太棒了!我想IMPORTDATA公式比IMPORTXML更稳定。我会习惯的!谢谢!!
=ARRAYFORMULA(QUERY({{"";"";SUBSTITUTE(ARRAY_CONSTRAIN(IMPORTDATA(
 "https://mall.han-don.com/goods/goods_list.php?cateCd=001002"), 10000, 1), """", )}, 
 {ARRAY_CONSTRAIN(IMPORTDATA(
 "https://mall.han-don.com/goods/goods_list.php?cateCd=001002"), 10000, 1);"";""}}, 
 "select Col2 where Col1 contains 'span class=cost prdPrice'")&".000원")