Home > Mobile >  How do I return data from website using ImportXML into separate columns Google Spreadsheets?
How do I return data from website using ImportXML into separate columns Google Spreadsheets?

Time:01-13

0

I'm using ImportXML in a Google Spreadsheet to input the population demographics from the website enter image description here

for a single N value you can also use:

=QUERY(IMPORTXML("https://www.socialexplorer.com/profiles/essential-report/zcta5-48105.html", "//div[contains(@class,'c-num')]"),"Select Col1 Where Col2='Population'")

**the formula is hardcoded to Population here; you may change it to Square Miles OR People Per Square Mile

enter image description here

CodePudding user response:

use:

=TRANSPOSE(QUERY(IMPORTXML(
 "https://www.socialexplorer.com/profiles/essential-report/zcta5-48105.html", 
 "//div[contains(@class,'c-num')]"),
 "select Col1 limit 4",-1))

enter image description here

  • Related