This has been covered elsewhere (here and here), but I'm having trouble in my specific situation getting an XPath to work correctly in a Google Sheets using =importxml
I'm trying to scrape some data from this site: http://quicktake.morningstar.com/fundnet/printreport.aspx?symbol=PRHSX
I used the Chrome extension XPath Helper
Which gave me this XPath: html/body/table[2]/tbody/tr[14]/td/table[5]/tbody/tr[2]/td[2]
I tried removing /tbody
as others suggested but Google Sheets still returns N/A
What is wrong with this code (in Google Sheets)?
=IMPORTXML("http://quicktake.morningstar.com/fundnet/printreport.aspx?symbol=PRHSX", "html/body/table[2]/tbody/tr[14]/td/table[5]/tbody/tr[2]/td[2]")
I'm trying to grab the -28.8 under the "Performance History" heading (the total % return for 2008).