ARRAYTOTEXT Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Serialize a range as readable or strict text while preserving the distinction between row separators, column separators and quoted text.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
=ARRAYTOTEXT(A2:B3) returns one text value summarizing a range. Adding 1 as the second argument produces a strict-style representation with braces and quoted text. It does not create a live array or export a CSV file. The official documentation describes both formats; the 10.0.0.169 implementation makes the two-dimensional separator rules precise.
Syntax and defaults
=ARRAYTOTEXT(array, [format])
| Argument | Meaning |
|---|---|
array |
Required range or data to represent as text |
format |
Optional; omitted or 0 gives concise text; 1 gives strict-style text |
Do not type the brackets. The inspected implementation accepts only numeric format values exactly equal to 0 or 1 after conversion; for example, 2 or 0.5 yields #VALUE!.
With format 0, values are visited row by row and separated by a comma followed by a space. With format 1, columns are separated by commas, rows by semicolons, text values are enclosed in double quotation marks and the complete result has outer braces. The documentation’s shorter statement about semicolons should not be read as “every cell is separated by a semicolon.”
Step-by-step: serialize a mixed rectangle
- Put the number
12in A2 and the textNorthin B2. - Put the number
8in A3 and the textSouthin B3. - In D2 enter
=ARRAYTOTEXT(A2:B3). - In D3 enter
=ARRAYTOTEXT(A2:B3,1). - Widen D so the returned text is visible; do not interpret clipping as missing characters.
| Formula | Expected text, shown literally |
|---|---|
=ARRAYTOTEXT(A2:B3) |
12, North, 8, South |
=ARRAYTOTEXT(A2:B3,0) |
12, North, 8, South |
=ARRAYTOTEXT(A2:B3,1) |
{12,"North";8,"South"} |
=ARRAYTOTEXT(A2:B2,1) |
{12,"North"} |
=ARRAYTOTEXT(A2:A3,1) |
{12;8} |
=ARRAYTOTEXT(12,1) |
{12} |
These exact strings are derived by tracing the documented formatting and the implementation’s row/column loops. They are not captured application outputs. Numeric integers and simple ASCII text deliberately avoid locale-sensitive decimal and date presentation.
Advanced case: make data types visible
Enter the number 12 in A5. Enter '12 in B5, using the leading apostrophe to store numeric-looking text. Then =ARRAYTOTEXT(A5:B5,1) is expected to produce {12,"12"}. This can make a number-versus-text mismatch visible when preparing a small diagnostic summary. Concise format would display 12, 12, hiding that distinction.
Keep the original cells as the authoritative data. The output is a snapshot-like text representation that updates with its formula dependencies, not a replacement for the original numeric cells. Do not add or average the returned string expecting the embedded numbers to be treated as separate cells.
Errors and representation limits
- An invalid format such as
=ARRAYTOTEXT(A2:B3,2)is expected to return#VALUE!in the inspected implementation. - A scalar input that is already an error is returned as that error. Error values inside a range follow a different serialization path; do not infer scalar propagation from the range description.
- The scalar empty-cell branch returns
#VALUE!. Empty cells within a rectangle are a different case; the examples above deliberately contain no blanks. - Strict-style output quotes text but the inspected code merely places quotation marks around its contents. It does not implement a general embedded-quote escaping scheme. Text containing quotes or separators is therefore unsuitable for an assumed round-trip data exchange without separate validation.
- Numeric cell formatting, such as a currency symbol or a displayed date, is not guaranteed to be reproduced by a conversion that operates on stored values. Do not use this as a “copy exactly what the screen shows” tool.
Use TEXTJOIN when the goal is a deliberately chosen human-readable delimiter and blank-handling policy. Use an actual export workflow when another program requires a particular file format; ARRAYTOTEXT’s braces and separators alone do not establish CSV, JSON or a portable formula literal.
Availability, version and verification scope
The official ARRAYTOTEXT reference was checked on October 18, 2026. The implementation discussion uses official SDKJS source tagged v10.0.0.169, matching the version/build designation of Desktop Editors 10.0.0-169. Desktop Editors 10.0 was released on October 13, 2026. The first version introducing this individual function is not established by these sources. Current documentation does not mark it retired or deprecated.
Examples in this guide are expected results from documentation, source inspection and independent calculations, not results observed in the application. They have not been tested in the application or its calculation engine. The unversioned help and pinned source do not establish identical behavior in older versions, mobile clients, every server deployment or imported workbooks. Examples use English names and comma argument separators; adapt formula-entry separators to your editor settings.