Text functions
ARRAYTOTEXT
Matches all 13 recorded answers
Recorded: 13 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | ARRAYTOTEXT |
| Bulgarian | ARRAYTOTEXT |
| Czech | ARRAYTOTEXT |
| Danish | MATRIXTILTEKST |
| German | ARRAYTOTEXT |
| Greek | ARRAYTOTEXT |
| English (Australia) | ARRAYTOTEXT |
| English (United Kingdom) | ARRAYTOTEXT |
| English (United States) | ARRAYTOTEXT |
| Spanish | MATRIZATEXTO |
| Estonian | ARRAYTOTEXT |
| Finnish | MATRIISI.TEKSTIKSI |
| French | TABLEAU.EN.TEXTE |
| Hebrew | ARRAYTOTEXT |
| Croatian | ARRAYTOTEXT |
| Hungarian | TÖMB.SZÖVEGGÉ |
| Indonesian | ARRAYTOTEXT |
| Italian | ARRAYTOTEXT |
| Japanese | ARRAYTOTEXT |
| Korean | ARRAYTOTEXT |
| Lithuanian | ARRAYTOTEXT |
| Latvian | ARRAYTOTEXT |
| Norwegian | ARRAYTOTEXT |
| Dutch | ARRAYTOTEXT |
| Polish | TABLICA.NA.TEKST |
| Portuguese (Brazil) | ARRAYTOTEXT |
| Portuguese (Portugal) | MATRIZPARATEXTO |
| Romanian | ARRAYTOTEXT |
| Russian | МАССИВВТЕКСТ |
| Slovak | ARRAYTOTEXT |
| Slovenian | ARRAYTOTEXT |
| Serbian (Latin) | ARRAYTOTEXT |
| Swedish | MATRISTILLTEXT |
| Thai | ARRAYTOTEXT |
| Turkish | DİZİMETİN |
| Ukrainian | ARRAYTOTEXT |
| Vietnamese | ARRAYTOTEXT |
| Chinese (Simplified) | ARRAYTOTEXT |
| Chinese (Hong Kong) | ARRAYTOTEXT |
| Chinese (Traditional) | ARRAYTOTEXT |
Names from Microsoft's support site.
What it does
ARRAYTOTEXT(array, [format])
ARRAYTOTEXT renders a whole array — or a range — as a single string.
It has the same two registers as its scalar sibling VALUETOTEXT, and the
difference between them is sharper here because an array has structure to lose.
Concise (format = 0, the default) walks the array in row-major order and joins the elements'
General-format renderings with ", ". Row structure is not preserved: a 3×2 array and a 1×6
array with the same elements in the same order render identically. Microsoft's page shows this
directly — a two-column, three-row range renders as a single comma-separated run.
Strict (format = 1) renders an array literal: braces around the whole thing, commas between
columns, semicolons between rows, text elements quoted, and Booleans, numbers and errors left
unquoted. This preserves shape and kind, and it reparses. Microsoft's page shows a 3×2 range
becoming {TRUE,#VALUE!;1234.01234,"Seattle";"Hello","1,123"} — which is worth studying, because
it contains the two facts that matter most: an error appears as bare #VALUE! (a rendered error,
not a propagated one) and the number 1123 formatted with a thousands separator appears as the
quoted string "1,123", because concise/strict rendering follows the cell's displayed text, not
its underlying number.
That last point is the trap. ARRAYTOTEXT renders what the cells show, so a formatted number can
come back as text that no longer parses as that number.
Arguments
ARRAYTOTEXT(array, [format])
| Argument | Required | Meaning (as documented by Microsoft) |
|---|---|---|
array | yes | The array or range to render as text. |
format | no | 0 (default) concise; 1 strict. Anything else returns #VALUE!. |
Two things about the first position. It accepts a range, not only an array value — which is the
usual way it is used, and which means the reference is resolved to values before the function sees
it (see the call pipeline). And a scalar is accepted, promoted
to a 1×1 array; upstream records that promotion explicitly, and it is why ARRAYTOTEXT("abc") is
not an error.
The format argument admits exactly 0 and 1; Microsoft documents anything else as #VALUE!.
Try it
Quirks
Result and edge cases
The return kind is Text — always a single scalar string, never an array. ARRAYTOTEXT is a
reducer: it is the one place in this part of the catalogue where a grid goes in and a scalar comes
out.
- The 32,767-code-unit cap is genuinely reachable. Rendering a large range produces a long
string, and strict mode adds quoting overhead. The cap and its two enforcement paths — truncation
on the interop path,
#VALUE!on the formula path — are described in the value universe. Which oneARRAYTOTEXTmeets has not been probed. - Errors inside the array are rendered, not propagated, in the documented example. That is a
striking exception to the usual discipline in
coercion and lifting, where coercion never silently
discards a worksheet error — here the error is neither discarded nor propagated but displayed.
Whether an error arriving as the whole
arrayargument behaves the same way is a separate question and is not settled here. - Empty cells inside a range have no obvious rendering. Whether they contribute an empty element, a zero, or nothing at all to the concise join is not established.
- Row-major order is the documented traversal, so concise mode reading order matches how you read the range on screen.
- Concise mode loses shape irreversibly. If you need the shape back, use strict mode.
Errors
| Error | Basis |
|---|---|
#VALUE! when format is anything other than 0 or 1 | documented on Microsoft's page (retrieved for this entry) |
#VALUE! if the rendered result exceeds the worksheet text cap on the formula path | expected from the value-universe chapter's account of the cap; not probed for this function |
any error value arriving as the array argument itself | behaviour not established here — see below |
How to implement
Notes for implementers
- Reuse the engine's General-format renderer, exactly as for
VALUETOTEXT. Concise mode is defined by reference to cell display, and the documented example shows that cell formatting reaches the output. An implementation that renders from the underlying double will disagree with Excel on every formatted cell. - Strict mode's separators are formula-language separators, which are locale-dependent in Excel. A strict rendering that is meant to reparse must use the separators of the locale it will be pasted into. This is a real portability hazard and deserves a test.
- Quote only what needs quoting. The documented example quotes text and leaves Booleans, numbers and errors bare; a uniform-quoting implementation is visibly wrong.
- Escape inner quotes by doubling, and test with a string that contains one.
- Traverse row-major and do not assume square.
- Check the result against the text cap and decide which failure mode you implement.
- Decide what an empty cell renders as and write it down; it is the most likely silent divergence.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
ARRAYTOTEXT · 1 lines · calc-func/src/catalogue/text_format.rs on GitHub7 arraytotext_fn "ARRAYTOTEXT" (1, 2) [R "array", V "format"] |s, a, sv| { arraytotext(s, a, sv) }
arraytotext · 21 lines · calc-func/src/catalogue/text_format.rs on GitHubfn arraytotext(site: &Site<'_>, a: &[CalcValue], sv: &mut EvalServices<'_>) -> Step<CalcValue> {
// An array that is one error value is the result; an error inside an array is shown (Excel
// 16.0.20430, 2026-10-25, dc-6au: `=ARRAYTOTEXT(#REF!)` #REF!, `=ARRAYTOTEXT(#DIV/0!,1)`
// #DIV/0!, `=ARRAYTOTEXT({1,#N/A})` "1, #N/A").
if let CoreRef::Error(code) = a[0].core_ref() {
return fail(code);
}
let strict = binary_flag(site, a, 1)?;
let g = grid(site, a, 0, sv)?;
let mut parts = Vec::with_capacity(g.cells.len());
for value in &g.cells {
parts.push(value_text(site, 0, value, strict)?);
}
let shown = if strict {
let rows: Vec<String> = parts.chunks(g.cols.max(1)).map(|row| row.join(",")).collect();
format!("{{{}}}", rows.join(";"))
} else {
parts.join(", ")
};
Ok(crate::catalogue::kit::text_value(&shown))
}
Kernels shared with other functions
read_valuecatalogue/text_formatvaluecatalogue/text_formatprofilecatalogue/text_formatrenderedcatalogue/text_formattextcatalogue/text_formatgivencatalogue/text_formatbinary_flagcatalogue/text_formatvalue_textcatalogue/text_formatlow32decimalNatural::zerodecimalNatural::from_u64decimalNatural::pow10decimalNatural::normalizedecimalNatural::is_zerodecimalNatural::mul_add_smalldecimalNatural::times_pow10decimalNatural::times_pow5decimalNatural::times_pow2decimalExactDecimal::readdecimalExactDecimal::binarydecimalhas_invalid_exponentformat/datetimelooks_like_datetime_formatformat/datetimewithout_subsecondsformat/datetimerender_with_datetime_tokensformat/datetimetokenize_datetime_formatformat/datetimeelapsed_token_atformat/datetimeclassify_minute_tokensformat/datetimetoken_kindformat/datetimeis_time_neighborformat/datetimepush_literalformat/datetimerender_datetime_literalformat/datetimeformat_elapsedformat/datetimeTimeParts::from_serialformat/datetimemeasured_hostformatcurrency_literalformatdigitsformatfifteenformatsplitformatgroupedformatgeneralformatsignificantformatsectionsformatbracketformatis_conditionformatis_elapsedformatcondition_holdsformatcondition_offormatstrip_tokensformatchooseformatitemsformatnumericformatliteral_textformatinteger_partformatfraction_partformatscientificformatfraction_codeformatFractionCode::renderformatmixed_fraction_under_space_groupingformatconvergentformattext_declared_date_localeformattextformattext_of_textformatmonth_nameformat/namesweekday_nameformat/nameslocale_namesformat/namesLocaleId::from_bcp47_language_taglocaleLocaleId::from_excel_lcidlocaleshort_date_orderlocaleshort_date_patternlocalecurrency_placementlocalecurrency_spacinglocalecurrency_negative_patternlocaleformat_profilelocaledays_from_civillocalecivil_from_dayslocaleymd_from_excel_seriallocaledecimalnumber_textfirst_precisionnumber_textnear_tienumber_textfirst_roundingnumber_textroundednumber_textincrementnumber_textasciinumber_textdays_from_civilported/date_kernelscivil_from_daysported/date_kernelsserial_unbounded_1900ported/date_kernelsymd_1900ported/date_kernelsis_leapported/date_kernelsdays_in_monthported/date_kernelswhole_serialported/date_kernelswholeported/date_kernelsweekday_sunday_one_basedported/date_kernelsremap_weekdayported/date_kernelsweekday_ofported/date_kernelsweekdayported/date_kernelstextported/text_kernelstext_from_strported/text_kernelsdate_integer_floorported/text_kernelspush_singleton_or_originalported/text_kernelspush_upperported/text_kernelsupperported/text_kernelserror_literalported/text_moremeasured_host_readervalue_textmeasured_spacevalue_textreadvalue_textnumbervalue_textdecimalvalue_textfractionvalue_texttokensvalue_textmonth_namedvalue_texttime_atvalue_textfull_yearvalue_textvalid_dayvalue_textthis_yearvalue_textserial_1900value_textdate_ofvalue_textdate_timevalue_text
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
VALUETOTEXT— the scalar counterpart, sameformatargument, same two registers. The pair splits on input shape.TEXTSPLIT— the closest thing to an inverse, and its sibling in the same upstream implementation module.TEXTSPLITturns a delimited string into a grid; conciseARRAYTOTEXTturns a grid into a delimited string. They do not compose cleanly, because concise mode drops row structure and quotes nothing.TEXTJOIN— the older and more controllable flattener: you choose the delimiter and whether to ignore empties, but you get no shape and no quoting.TEXTJOIN(", ", FALSE, range)is the hand-rolled approximation of concise mode, and it differs at least in how it renders errors and formatted numbers.CONCAT— flattens a range with no delimiter at all.TEXT— formats a single number with a supplied format string; unrelated except by name confusion.- Strict mode is the function to reach for when you want to see what a dynamic-array formula actually produced, which makes it a debugging tool as much as a data function.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents