Forum Discussion
TextJoin keeps adding double quotation marks - How do I make it stop?
- Jul 21, 2020
Barclay0x00 depending on the "other" application you might have options there to keep source formatting or merge formatting, etc... But if you want to have tabs added, you might be better off just having the text in consecutive columns and then copy the row and paste it. Or in your example, no text join necessary, just select B3:D3 and copy and paste (if pasting into word, select paste text only)
I'm doing a lot of CONCAT statements to build a configuration script and then running a TEXTJOIN on several of those with a CHAR(10). Sometimes the CONCAT statement includes strings in quotation marks, and when I run a Textjoin it makes those into double quotation marks, and then wraps each cell in the selection with a pair of quotation marks.
As some of these generated configs can get rather lengthy, what ends up needing to be done is pasting it into a text editor like Sublime Text and initially doing a bulk search and replace on double quotes and replacing them with another temporary character, and then replacing single quotes with nothing, and then replacing the temporary characters with single quotes. But I have to be sure the temp character is something not used anywhere else in the document.
So how the heck can I do this without the quotes? I'm sure this behaviour of TEXTJOIN exists for some obscure use case, but it's really annoying.
Yes, I know, Excel is meant for numbers.
That's not the formula, TEXTJOIN or any other, that's how Excel works with the clipboard. You may manually enter into the cell any text with special characters (e.g. multi-line text using Alt+Enter), copy this cell and expand clipboard pane - you will see such text within it quotes. Moving text to the clipboard Excel applies CSV standard, it says text with special symbols shall be quoted, otherwise it could be not parsed correctly in another application.
Workaround is to use macros to play with clipboard.