When importing chat transcript by importXML, e.g.,
=IMPORTXML("http://chat.stackexchange.com/transcript/7/2015/8/13", "//div[@class='content']")
I find that some messages split across several columns:
+-------------------+---------------+----------------+
| "The tag-wiki ... | google-search | tag instead. |
+-------------------+---------------+----------------+
I understand this happens because "google-search" is within its own HTML element:
... use the <a href="//webapps.stackexchange.com/questions/tagged/google-search"><span class="ob-post-tag" style="background-color: #E2EDFA; color: #5D7A9C; border-color: #5D7A9C; border-style: solid;">google-search</span></a> tag instead.
But I don't want to have multiple columns like that. I want all chat message in the same cell:
The tag-wiki contains the sentence: If you are talking about search, use the google-search tag instead.
Is there a way to either prevent importXML from using breaking text into columns, or to join them back? join("", importxml(...))
throws an error because the range is two-dimensional.
//div[@class='messages']/..
. This will return a 2X2 array. The first column will contain the usernames of the authors and the second column will contain the messages, preceded by the timestamp.