Google Sheets 如何将整列转换为字符串

Kli*_*ith 1 concatenation google-sheets array-formulas google-sheets-query google-sheets-formula

我有个问题。我在 Google Sheet 中有一个专栏,类似于 [此处][1]

------------------
| hello           |
-------------------
| my name is John |
-------------------
| Nice to meet you|
-------------------
Run Code Online (Sandbox Code Playgroud)

问题是:我怎样才能从中得到像“你好,我的名字是约翰,很高兴认识你”这样的字符串?

pla*_*er0 5

尝试:

=JOIN(", ", A1:A3)
Run Code Online (Sandbox Code Playgroud)

或者:

=TEXTJOIN(", ", 1, A:A)
Run Code Online (Sandbox Code Playgroud)

如果你想要不带逗号的值,请使用:

=TRIM(QUERY(A:A,, 99^99))
Run Code Online (Sandbox Code Playgroud)

JOIN并且TEXTJOIN仅限加入最多 50 000 个字符。如果您的数据集更大,请执行以下操作:

=ARRAYFORMULA(QUERY(QUERY(A:A, "where A is not null", 0)&",",,99^99))
Run Code Online (Sandbox Code Playgroud)