Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to quote a quote with the CONCATENATE function in OOCalc

In OOCalc I want to use the CONCATENATE function to add quotes to each string in column A.

So in cell B1 I want to do:

=CONCATENATE("\"",A1,"\"") 

OOCalc does not like this, or without the escaping backslash.

Does anyone know how to do this, or what an alternative method might be?

like image 934
Richard H Avatar asked Jan 27 '10 09:01

Richard H


People also ask

How do I insert a quote in LibreOffice?

In LibreOffice, as default, when you type a (neutral) quotation mark (Unicode U+0022 " )¹ it is replaced by a left or right double quotation mark (Unicode U+201c “ and U+201d ” ),² one or the other is chosen depending on whether or not there is a character to the left.


1 Answers

This works for me:

=CONCATENATE("""",A1,"""") 

Repeating the quotes escapes them (as it does in Visual Basic, I believe), so """" reads as: 'one quote to start a string, one escaped quote (""), then one quote to finish the string'.

like image 195
Andy Balaam Avatar answered Sep 28 '22 09:09

Andy Balaam