如何使用 OOCalc 中的 CONCATENATE 函数引用报价

OOCalc中,我想使用 CONCATENATE函数为列 A 中的每个字符串添加引号。

在 B1单元格中,我要做的是:

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

OOCalc不喜欢这样,或者没有转义反斜杠。

有人知道如何做到这一点,或什么替代方法可能是?

128770 次浏览

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'.

Use char(34) to get the quote character.

CONCATENATE(char(34); B2; char(34))

Identical to the above but without the function:

="""" & A1 & """"

You can use single quotations marks within the double quotation marks and vice versa.

You can do it in 2 ways,

  1. By using =CHAR(34) in the places of doible quotes eg: =CONCATENATE("coffee",CHAR(34),"code")

  2. By concatenating cell values

Steps

  • Set the cell value as double quotes -> "
  • Concatenate that cell in the string, wherever you need double quotes. eg: E1 = " F1 = =concatenate("coffee",E1,"code")

Thank you