aabujamra
aabujamra

Reputation: 4636

Keeping ImportData results in one single cell

I'm using import data function:

=IMPORTDATA("http://www.csl.com.br")

However, the results come in a lot of cells. I have a list of websites to do that, so I would need it to come in one single cell. Is there a way to retrieve all of that in one single cell?

Upvotes: 1

Views: 946

Answers (2)

Rub
Rub

Reputation: 2738

Thank you to player0 I got the solution I couldn't find.

=join(",",importdata(url))

The text I was receiving was similar to

{"code":200,text:"{\"Tag\":\"Blablah\"}"}

And importdata was occupying 2 cells with it (separating by the ","). I just wanted the content on the 2nd cell but I couldn't parse it because it was already on a different cell (apparently).

Now the whole response gets contained in one cell and I can parse at will.

Upvotes: 1

player0
player0

Reputation: 1

=ARRAYFORMULA(JOIN(CHAR(10),SPLIT(IMPORTDATA("http://www.csl.com.br")&CHAR(10),CHAR(10))))

6

or:

=ARRAYFORMULA(SUBSTITUTE(JOIN(CHAR(10),SPLIT(IMPORTDATA("http://www.csl.com.br")&
 CHAR(10),CHAR(10))),CHAR(10)&CHAR(10),""))

9

Upvotes: 2

Related Questions