xpathgoogle-sheetsxml-import

Getting 2 columns as a result, only want one specifically


With the following piece of Importxml I'm getting two columns, one is empty and the other one is filled with data that I want.

=importxml("http://www.runeclan.com/clan/Ultimate_Despair/members?sort_by=name&order=asc","//*[contains(@class, 'clan_rank')]")

Is there a possiblity that I can only get the second one? I've tried the following, but it didn't work since it's one element.

=importxml("http://www.runeclan.com/clan/Ultimate_Despair/members?sort_by=name&order=asc","//*[contains(@class, 'clan_rank')][2]")

Solution

  • Try:

    =INDEX(importxml("http://www.runeclan.com/clan/Ultimate_Despair/members?sort_by=name&order=asc","//*[contains(@class, 'clan_rank')]"),1,2)