jason
jason

Reputation: 4429

Google sheet importxml xpath query

I'm trying to get the data for "Next Earnings Announcement" for this http://www.bloomberg.com/quote/1880:HK site.

I have tried

=ImportXml( "http://www.bloomberg.com/quote/1880:HK", "//span[@class='company_stat']" )

=ImportXml( "http://www.bloomberg.com/quote/1880:HK", "/html/body/div[2]/div[1]/div[1]/div[2]/div[2]/div[2]/div[1]/div[1]/div[3]/table/tbody/tr[16]/td/text()" )

getting a #N/A, want 10/27/2014 as result

Upvotes: 0

Views: 597

Answers (1)

Tomalak
Tomalak

Reputation: 338148

Instead of your fragile, horribly complicated XPath expression, try a useful one:

//th[normalize-space() = 'Next Earnings Announcement']/following-sibling::td

Upvotes: 1

Related Questions