I am using ImportXML to get some data from a website which looks like the following:

=ImportXML("https://www.papercall.io/events?cfps-scope=&keywords=uk","//div[@class='panel panel-default']")

While it gets the data ok, two of the fields are both headings <h4> and the sheet seems to be importing both of these together into one field. Is there a way I can change the formula above to either change the <h4> into a <p> or just to add a line break after the <h4> is closed?

  • formula returns #N/A – user0 Jul 23 '19 at 14:44
  • Yes because I'm not using the real website. I will edit it. – jonroper Jul 23 '19 at 14:51
  • i.stack.imgur.com/kDr6c.png which cell(s) is the one bothering you and how do you wish it to look like? – user0 Jul 23 '19 at 15:55
  • Column A is fine. Column B has a URL and then dates that I would want to be separated. I would want the event date to go into column C. – jonroper Jul 24 '19 at 8:48
  • you can regex it like this:

 "//div[@class='panel panel-default']"),,1), 
 "//div[@class='panel panel-default']"),,2), "(.*)Event Dates")), 
 "//div[@class='panel panel-default']"),,2), "(Event Dates.*)"))})

enter image description here

| improve this answer | |
  • 1
    That works perfectly. Thanks! – jonroper Jul 25 '19 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.