'ImportXML extract table into Google Sheets
I'm trying to extract the whole following Warcraftlog table in a Google Sheets. I just need the "names" with "count" and the "percentage numbers".
=IMPORTXML("URL"; "XPATH")
=IMPORTXML("https://classic.warcraftlogs.com/reports/P4CQdFTp21wADfKX/#boss=-3&difficulty=0&type=auras&ability=31035"; "//table[contains(@id,'main-table-0')]")
But it doesn't work with //table[contains(@id,'main-table-0')]
in the Xpath.
With //table/tr/td
it will extract nearly everything on the warcraftlog website, except the table I want to extract.
Is there another option to extract them with XPath?
Solution 1:[1]
Nice it works! You're a legend!
But how did you know how to change the URL?
The first is my original URL and the second one is yours. You deleted completely the auras and ability string. I have no idea why it still works! ^^
https://classic.warcraftlogs.com/reports/P4CQdFTp21wADfKX/#boss=-3&difficulty=0&type=auras&ability=31035
https://classic.warcraftlogs.com/reports/auras/P4CQdFTp21wADfKX/0/0/6175385/buffs/31035/0/0/0/0/source/0/-3.0.0/0/Any/Any/0
How did you know how to change it? I couldn't find on google how to change an URL like that!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Tony |