Arshit patel
Arshit patel

Reputation: 133

HTML data not pulling out in google spreadsheet

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.

Upvotes: 1

Views: 229

Answers (1)

Anton Dementiev
Anton Dementiev

Reputation: 5716

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)

Upvotes: 1

Related Questions