0
votes

I spend hours trying to fix this but can't find where the issue is.

I try to import data in google spreadsheet using importxml.

Here is the url : http://www.journaldesfemmes.com/maman/creches/3-pom/creche-3098

I'm interested in exctracting email and phone number for exemple. I used chrome inspector to copy the Xpath, and few chrome plugins. I guess the issu is the Xpath. Here is the formula I used in spreadsheet :

=importxml("http://www.journaldesfemmes.com/maman/creches/3-pom/creche-3098";"/html/body/div[4]/div/div[1]/div[2]/div[1]/div/div/div/div/div[10]/table/tbody/tr[2]/td[2]")

Hope someone can help

1

1 Answers

0
votes

Since the data you want is in tables, it might be easier to use importhtml. The table you want you can get with this:

=IMPORTHTML("http://www.journaldesfemmes.com/maman/creches/3-pom/creche-3098","table",2)

To get just the phone number add index (row and column of table)

=index(IMPORTHTML("http://www.journaldesfemmes.com/maman/creches/3-pom/creche-3098","table",2),3,2) 

email is:

=index(IMPORTHTML("http://www.journaldesfemmes.com/maman/creches/3-pom/creche-3098","table",2),4,2)