Forum Discussion
Problem with FILTERXML
Hello Guys!
I have a problem with the FILTERXML function.
(please note that my code is in German)
I'm trying to get the current follower amount of our companies social media channels with the FILTERXML-function.
I've tried it insode Excel & Google Sheets, but neither seems to work, also with X path & full x path
Maybe there is someone out here who could help me with this as i'm completely frustrated ๐
Excel:
=XMLFILTERN("https://www.instagram.com/skinbaronde/";"//html/body/div[1]/section/main/div/header/section/ul/li[2]/a/span")
>Result: #Value!
Google Sheets:
=IMPORTXML("https://www.instagram.com/skinbaronde/";"/html/body/div[1]/section/main/div/header/section/ul/li[2]/a/span")
>Result: #N/A
Thanks in advance!
1 Reply
- nobutakekamiyaCopper Contributor
Hi Timo
you should pass the xml data to the FILTERXML function.
If you get a xml data through an API, then you need the WEBDIENST (or WEBSERVICE function).
so:
=XMLFILTERN(WEBDIENST("[your url]");"[your xpath]")
You find the information about the WEBDIENST function hier:
https://support.microsoft.com/de-de/office/webdienst-funktion-0546a35a-ecc6-4739-aed7-c0b7ce1562c4
If the xml data is too big, then you might get an error message "#WERT"...