HTML data not pulling out in google spreadsheet

自闭症网瘾萝莉.ら 提交于 2019-12-24 17:51:56

问题


I have tried to pull out HTML data from NSE website in my google spreadsheet, but script symbol containing "&" is not getting pulled out but other normal scripts which does not include character "&" can be easily pulled out.

I am using following formula:

=importhtml("https://www.nseindia.com/marketinfo/sym_map/symbolMapping.jsp?symbol="&B1&"&instrument=OPTSTK&date=-&segmentLink=17","table",3)

where B1=M&M which is Indian stock market script symbol (data not pulled out) try B1=ACC (data will be pulled out)

if in below link same symbol(M&M) is entered then data will be there in web page.

https://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp

Any help will be appriciated by word of thanx.


回答1:


Try wrapping the stock ticker in an ENCODEURL function. It loaded the data for me.

=importhtml("https://www.nseindia.com/marketinfo/sym_map/symbolMapping.jsp?symbol="& ENCODEURL("M&M") &"&instrument=OPTSTK&date=-&segmentLink=17","table", 3)


来源:https://stackoverflow.com/questions/58186642/html-data-not-pulling-out-in-google-spreadsheet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!