Google Sheets - index importxml doesn't work

I wanted to make a sheet with information about companies, but unfortunately, impossible to do so.

However, I don't know what else I can do, I followed the instructions in the documentation to the letter:

  • I have the URL : https://www.stockopedia.com/share-prices/EPA:GET/

  • I have the XPath of the element I want: enter image description here

(I even made two versions, one with " " and another with ' '), or with the "full XPath" and nothing works, I don't see what else I can do...

  • //*[@id="__next"]/main/div/div[2]/div[4]/div/div[1]/div/div[2]/dl/dd[1]/a
  • //*[@id='__next']/main/div/div[2]/div[4]/div/div[1]/div/div[2]/dl/dd[1]/a
  • /html/body/div[1]/main/div/div[2]/div[4]/div/div[1]/div/div[2]/dl/dd[2]/a

enter image description here

Can you help me ?


Solution 1:

You will use the single quotes within the double quotes.

I had success with

=IMPORTXML("https://www.stockopedia.com/share-prices/EPA:GET/","//*[@id='__next']/main/div/div[2]/div[4]/div/div[1]/div/div[2]/dl/dd[1]/a")

Example sheet here.