C
C
Crt142022-04-07 18:03:56
Google Sheets
Crt14, 2022-04-07 18:03:56

In google sheet with importxml how to make import with one formula?

Good afternoon,
There is such a table with prices in Euro

This table, as I understand it, consists of a div:
heading - ( col-md-12 item-header)
odd lines - ( col-xs-12 item-list zebra-even)
even lines - ( col-xs-12 item-list zebra-even)

ImportXML x 3 have to be done separately for each div
when importing with a heading everything is OK
when importing odd rows - ( col-xs-12 item-list zebra-even) all odd data is imported. lines + for some reason all prices with even/odd lines but no country specified
when importing even lines - ( col - xs - 12 item - list zebra - even) data + countries are imported but without prices

I have a question, do these errors occur because I do separate imports for even/odd lines? and is it possible to import with one formula without splitting, if so, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2022-04-08
@Crt14

Perhaps you want to import the entire table. It consists of an equal number of divs nested within multiple identical divs. It doesn't matter what class they have, as long as they have a simple pattern - rows, and in cell rows, the following code will work

=IMPORTXML(A1;"//div[contains(@class,'events-table-1')]/div")

where in A1 https://www.iru.org/en/intelligence/fuel-prices?fr...
625049fd17a11718483514.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question