1

I want to get live data from a website. I select inspect and copy the XPath from where I want the data to import, but I get an #ERROR!.

=IMPORTXML("https://www.jamstockex.com/market-data/listed-companies/stock-performance/afs/latest","//span[@id="content"]/div[2]/div/div/div/div[1]/div[5]/div[1]/table/tbody/tr[1]/td")

Not sure what I'm doing wrong or how to get the results I desire.

When I enter:

=IMPORTXML("https://www.jamstockex.com/market-data/listed-companies/stock-performance/afs/latest","//tr")

I get results, but more data than I want to import.

In the screenshot from the website, I want to import from last traded price or the content from last two tables minus titlesenter image description here

With the attached png is there a way to only import the figures and not the titles?

  • Please take a screenshot and highlight the field(s) you want retrieved. Post the screenshot in your original post, please. – Bill Hileman Jan 2 '18 at 19:34
  • @BillHileman Hey I updated – Phoebe Jan 2 '18 at 22:31
1

The following xpath will return the ten data columns on that page:

//div[@class='col-md-6']//td

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.