TEXTJOIN 函数

目录
索引 🔎︎

# TEXTJOIN

连接一或多个字符串，并使用分隔符将这些字符串隔开。

### 语法

TEXTJOIN( delimiter, skip_empty, String 1[; String 2][; … ;[String 253]] )

「分隔符」是文本字符串，可以是范围。

skip_empty is a logical argument. When set to FALSE or 0, empty strings will be taken into account and this may lead to adjacent delimiters in the returned string. When set to any other value (e.g. TRUE or 1), empty strings will be ignored.

String 1[; String 2][; … ;[String 253]] are strings, references to cells or to cell ranges of strings.

区域将逐行遍历 (从上往下)。

如果「分隔符」为区域，该区域的大小不必与要合并的字符串数目相同。

如果分隔符的数量多于字符串的数量，则只会用到一部分分隔符。

如果分隔符的数量少于字符串的数量，分隔符用完时会从头开始再用一遍。

### 示例

=TEXTJOIN(" "; 1; "Here"; "comes"; "the"; "sun") returns "Here comes the sun" with space character as delimiter and empty strings are ignored.

if A1:B2 contains "Here", "comes", "the", "sun" respectively, =TEXTJOIN("-";1;A1:B2) returns "Here-comes-the-sun" with dash character as delimiter and empty strings are ignored.

#### Technical information

This function is available since LibreOffice 5.2.

This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.TEXTJOIN

相关主题

TEXTJOIN wiki page.

CONCAT

CONCATENATE