Separate XML data with Import XML on Google Sheets - google-sheets

I am using IMPORTXML in Google Sheets to data pictured from https://www.sherdog.com/fighter/Kelvin-Gastelum-74700
The data output is contained in cell A1. What custom function would I need to separate the data into fields and records as it is displayed on the website?!
Kelvin Gastelum Sherdog
I tried using a custom function without success.

Try
=importhtml(url,"table",2)
you have 9 tables, so you can try =importhtml(url,"table",1) to =importhtml(url,"table",9)

Related

exporting all sheets of a view as csv using TABCMD

I have a view in a tableau and want to export the view as a csv using TABCMD. I am able to generate all sheets as part of single pdf. In case of csv when I try to export I only get a single sheet. Not sure how to retrieve all sheets at once.
To sum up I am not able to find a command that could export me all sheets at once as a csv. I am also interested if there is a way to query a specific sheet as in Tableau UI.
Any insight on either approach would be helpful

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?
You are after an html table so switch to IMPORTHTML
Data is pulled dynamically from another endpoint you can find in the network tab of the browser, so make your request to that
The last two webpage visible table columns are $ delimited in the retrieved table so you will need to split the entries e.g. using helper column in column D of sheet (if formula in A1) containing SPLIT
=IMPORTHTML("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", "table",1)

Missing some of the data when using ImportRange together with Query function [duplicate]

This question already has answers here:
Query is ignoring string (non numeric) value
(2 answers)
Closed 5 months ago.
The screenshot below is the data that I want to export to another google sheet:
The screenshot below is my destination google sheet with data imported from the google sheet above:
May I know why ALL is missing in Cell CD14 when I import the data using IMPORTRANGE & QUERY? How should I fix it so that everything will be imported? Thank you.
Query has issues with mixed data types. See also here
To work around that you can either format column CD as text (in the source table) or convert everything to text after it is imported.
=Arrayformula(iferror(query(importrange(...., ...)&"", "Where Col5 = 'Transmit'")))
You should be able to keep all original data types by using FILTER rather than QUERY, e.g.:
=IFERROR(FILTER(IMPORTRANGE(NameList!C3,"Sheet9!C14:J18"),IMPORTRANGE(NameList!C3,"Sheet9!G14:G18")="Transmit"))
I will add that, if you plan to be importing more than this one formula's worth of data using IMPORTRANGE, it will be more efficient to use IMPORTRANGE to import into its own sheet in your destination spreadsheet the entire range you'll ever want to reference from it, and then write your processing formulas referencing that new sheet rather than by making individual IMPORTRANGE calls (which will slow down your sheet). If you do use the one IMPORTRANGE call to get all the data you'll need into the destination sheet, you can just hide it and leave it in the background if you like.

Do spreadsheet formulas work on data imported by importhtml/xml?

I use importhtml to receive data from an website. Now i try to evaluate this data with an formula from my Spreadsheet.
I want to find the max value of the imported data.
I use =max() for that.
Is it possible that imported data (using importxml, importhtml, google finance) can not be further access / manipulated?
Code:
=INDEX(importhtml("http://www.cboe.com/data/current-market-statistics";"table";0);;5)
Spreadsheet formula: =max()
=max(INDEX(importhtml("http://www.cboe.com/data/current-market-statistics";"table";0);;5))
should work (and return 1.07 at the moment).

Problems with Google Spreadsheets ImportXML function

I'm having some problems with ImportXML in my Google Spreadsheet. I currently have two sheets, each with their own ImportXML, retireving (basically) the same data - the server providing the data has updated their feed service to require the use of a user-specific "key" in the URL to track who is retrieving what. Prior to this change, my ImportXML worked just fine. They are about to turn off the non-key feeds, and my spreadsheets are about to break.
In the first (working) sheet, this is the feed.
I can import the data sucessfully by using the following syntax in cell A1:
=importXML(ʺhttp://atilla.hinttech.nl/fseconomy/xml?id=18649&key=M3LRG43T&query=GroupLogByMonth&month=10ʺ,ʺ//GroupLogByMonthʺ)
In the new (non-working) sheet, the URL to the feed (including my user-specific "keys") is here.
I am unable to create a working importXML on this sheet. None of my attempted Xpath queries worked, except "*"; but that resulted in all elements being lumped into a single cell.
I have shared my spreadsheet file (link is in the comments below - I am unable to post more than 2 links) with each of these sheets so that the above examples can be seen and played with. Any advise on the non-working sheet would be wonderful.
In the new XML feed there is no tag "GroupLogByMonth". This might explain why your Xpath query won't return anything when you look for that.
Did the format of the XML change too, next to the new URL?

Resources