2
votes

URL1, URL2, URL3 all contain one table each.
I am currently importing each in different sheets.
Is there anyway to import them continuously in the same spreadsheet?

Update1: The number of rows in tables vary everyday, so I have to do it manually. I would like to know if there is a way to combine two importhtml functions with query or concat?
Something like =importhtml (url1, table,2) & importhtml (url2, table,2)

Update2: I have attached sample file link here https://docs.google.com/spreadsheets/d/1VdFMzRTwcaFAglGNpqvzGytdz_mqohtxGgAywKlLi0U/edit?usp=sharing
In A1 there's one table and in I1 there is another.
This is stock market data so it changes everyday. I would like to know if there is a way to combine the formulas?

1
Please use a test sheet with examples and expected results. Your question is way too general. - marikamitsos

1 Answers

1
votes

EDIT

(following OP's request)

This worked perfectly. Is there anyway to loose the header row of the second table...

Please inclose the IMPORTHTML functions in a QUERY

={QUERY(IMPORTHTML("xxx","table",1), "where Col1 is not null",1);
  QUERY(IMPORTHTML("yyy","table",1), "where Col1 is not null offset 1",0)}

Please notice that in the second QUERY we use offset 1",0.
This will eliminate the headers of the second table.

PRO TIP
Since you now have everything in queries, you can also take advantage of all the many, so very flexible query properties/clauses like select, order by, group-by etc.


I am currently importing each in different sheets, is there anyway to import them continuously in the same spreadsheet?

Most likely yes. It highly depends on the formulas you use and the structure of the tables.
If they all have the same amount of columns you can probably create an array like

={IMPORTHTML("xxx","table",1);
IMPORTHTML("yyy","table",1)}
IMPORTHTML("zzzz","table",1)}

The above formula will stack the tables one on top of the other.

(hard to give a definite answer without further info and expected results)