Formualizer Docs

ARRAYTOTEXT

Converts an array or range into a text representation.

ARRAYTOTEXT(array, [format]) supports concise (0) and strict (1) output styles.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=ARRAYTOTEXT(array, [format])

Arguments

ArgumentTypeRequiredDefault
arrayany or range (range)Required—
formatnumberOptional0

Return type

Can return text.

Remarks

  • Strict mode returns brace-delimited array syntax with row/column separators.
  • Concise mode flattens all values into a comma-space list.
  • Cells are converted using the same scalar text rules used by VALUETOTEXT.
  • Errors in scalar-only input propagate immediately.

Examples

Convert a rectangular array containing numbers and text to its concise representation.

Formula =ARRAYTOTEXT({1,"East";2,"West"})

Expected result 1, East, 2, West

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use strict representation to preserve the two-dimensional array syntax.

Formula =ARRAYTOTEXT({1,"East";2,"West"},1)

Expected result {1,"East";2,"West"}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Show how an empty text element is represented in strict format.

Formula =ARRAYTOTEXT({""},1)

Expected result {""}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

An error in the format expression propagates.

Formula =ARRAYTOTEXT({1,"East"},1/0)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Concise flattened output

Formula =ARRAYTOTEXT({1,2,3})

Expected result 1, 2, 3

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Strict 2D representation

Formula =ARRAYTOTEXT({1,2;3,4}, 1)

Expected result {1,2;3,4}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What changes when format is 1?

Format 1 returns brace-delimited array syntax; format 0 flattens values into a comma-space list.

Implementation

Engine source

On this page