xmlgoogle-sheetsimportgoogle-sheets-formula

Deal with line break while using IMPORTXML in Google Sheet


I'm trying to fetch some data from this web page: https://www.rendimentibtp.it/quotazione-btp/IT0005439275

Everything's good, until I come up to the "scadenza" <div> (screenshot here), where are shown 2 dates, separated by a </br>.

enter image description here

With the formula =IMPORTXML("https://www.rendimentibtp.it/quotazione-btp/IT0005439275";"(//*[@id='scadenza'])") I get the twho dates in the same row, separated by an empty cell (A2 and C2).

enter image description here

While my need is to fetch them in two different cells in the same column (A2 and A3)

enter image description here

Do you have any idea how to fix this?

Many thanks


Solution

  • You may try:

    =tocol(<your_importxml_formula> ,1)