Import HTML span tags into Google Sheets

285 views
Skip to first unread message

alexmbg

unread,
Jul 28, 2016, 10:20:39 PM7/28/16
to Google Visualization API
Hi there, please advise if this post doesn't belong here.

I'd like to import analyst price targets for a a certain stocks (Low, Average and High; 85.00, 123.63 and 185.00 respectively). The data is in yahoo finance (new UI) and is coming through SPAN tags with the custom attribute "data-reactid" as follows:

Low: <span data-reactid=".tykswaj054.1.$0.0.0.3.1.$main-0-Quote-Proxy.$main-0-Quote.0.2.1.$priceTargets.$legend.0.2">85.00</span>

Average: <span data-reactid=".tykswaj054.1.$0.0.0.3.1.$main-0-Quote-Proxy.$main-0-Quote.0.2.1.$priceTargets.$slider.3.0.2">123.63</span>

High: <span data-reactid=".tykswaj054.1.$0.0.0.3.1.$main-0-Quote-Proxy.$main-0-Quote.0.2.1.$priceTargets.$legend.1.2">185.00</span>

Since these tags have the data-reactid attribute I can't use the usual formula {IMPORTHTML(url, query, index)} to import HTML data from a table into Gsheets.

Your help is appreciated,
AB

Daniel LaLiberte

unread,
Jul 28, 2016, 10:38:30 PM7/28/16
to Google Visualization API
I don't understand the context of your message, relative to Google Charts, so it doesn't sound appropriate for this forum.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/a1e9a663-bff6-4778-8487-f842671c54d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages