Contact

TEXT in Calligra Sheets: Convert Values to Strings

Text Intermediate Calligra Sheets

Learn Calligra Sheets TEXT syntax, reproducible number-to-text examples and a critical difference from Excel TEXT formatting.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =TEXT(1234.56) is documented to return the string “1234.56” in an English-decimal locale; =TEXT("KSpread") returns “KSpread”. The KDE manual calls TEXT a value-to-text converter. It is not safe to assume it performs Excel-style number formatting. In the exact Calligra 26.08.2 implementation, only the first argument is read and passed to a string converter.

Version and validation scope: Registered in the official Calligra 26.08.2 release, published 2026-10-08. The shipped help, function registration and implementation were inspected at immutable KDE commit 72123cc643f6625351139e7df294544255a1056f, accessed 2026-10-12. Examples below are either officially documented or source-derived expected results in an English locale. Calligra itself was not executed.

Availability and version history

  • Introduced: Documented by 26.08.2; original introduction not established.
  • Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
  • Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.

Purpose: preserve a value as text

Use TEXT when an imported number, a computed value or a text value needs to enter a text-processing pipeline. Unlike T(value), TEXT applies the spreadsheet converter to the first argument; it does not intentionally suppress numeric values. For example, a numeric quantity in A2 can be passed through =TEXT(A2) to get a string suitable for concatenation or text inspection. Be careful: the actual display spelling of numbers or dates may depend on locale and value-conversion rules. Converting a number to text does not recreate lost leading zeros or an original import representation.

Exact officially documented syntax

=TEXT(value)
Argument Status XML type Meaning Default
value Required Any Value or reference to convert to a string None

The 26.08.2 help XML declares one Any parameter and shows exactly TEXT(value). This is the documented public interface in the English handbook. The source registration, however, calls setParamCount(1, 2) for TEXT, admitting one or two arguments. Its implementation reads only args[0]; it never reads args[1]. This is an explicit documentation/registration/implementation discrepancy:

  • Supported/documented teaching syntax: use TEXT(value) with one argument.
  • Additional C++ arity accepted: the dispatcher allows a second parameter, but the function body does not apply a formatting instruction from it. Its purpose and type are not documented in the shipped XML.
  • Do not teach TEXT(number; "format") as an Excel-compatible formatting tool. Whether an actual local build exposes any wrapper changes is native-untested. The current pinned C++ implementation ignores the second argument.

English Calligra formulas use a semicolon between operands when needed (=TEXT(12.5;"0.00") is a diagnostic illustration, not recommended production syntax). . is used in English-decimal examples; another locale may show or require a comma. Avoid asserting an exact text spelling for dates, currencies, booleans or floating point edge cases without native locale tests.

Reproducible worksheet experiment

Enter the following inputs in A2:A6, taking care to distinguish quoted/text data from numeric cells. Enter =TEXT(A2) in B2 and fill down. Check whether the output is text (for example with a separate documented type test), not merely that it visually resembles A2.

Cell A input Data type Formula in B Expected English-locale text
A2 1234.56 Number =TEXT(A2) 1234.56 (official source example)
A3 12 Number =TEXT(A3) 12
A4 0 Number =TEXT(A4) 0
A5 KSpread Text =TEXT(A5) KSpread (official source example)
A6 007, entered/stored as text Text =TEXT(A6) 007

If A6 is stored as the number 7 and only displayed with leading zeros, its string representation can instead be 7. TEXT does not promise to recover a text identifier from the original import. Results are expected, not observed native outputs.

Examples and important boundaries

Formula Source-derived expected result Check
=TEXT(1234.56) 1234.56 (text) KDE’s English-language XML example
=TEXT("KSpread") KSpread KDE’s XML example
=TEXT(12) 12 (text) English integer string conversion
=TEXT(0) 0 (text) Zero is represented rather than suppressed
=TEXT("007") 007 Existing text retains the characters
=TEXT(12.5) 12.5 (text) English decimal convention; locale-sensitive
=TEXT(LEFT("KDE2026";3)) KDE LEFT returns text first
=TEXT(4+6) 10 (text) Independent arithmetic, then conversion
=TEXT("Alpha";"000") Alpha Pinned dispatcher admits 2; pinned C++ reads only first; native-untested

These text representations are expected in an English-decimal environment; they are not guaranteed in every installation. No first-party native test or specific error-cell display was observed.

Advanced applications

Safely concatenate a numeric value into a label

With A2 as an integer quantity 12, the formula =CONCATENATE("Units: ";TEXT(A2)) is expected to produce Units: 12. This demonstrates the motivation for text conversion. A semicolon separates arguments in the official CONCATENATE syntax.

Build a text identifier from a counted value

With B2 as numeric batch number 42, =CONCATENATE("B-";TEXT(B2)) is expected to produce B-42. If a four-digit identifier is required (B-0042), TEXT in this Calligra version is not established as a formatting/padding tool. Design and verify a padding expression or data-import rule separately; never claim that Excel’s TEXT(42,"0000") formatting semantics are present in this C++ code.

Contrast TEXT with the T function

For numeric input A2 = 12, =TEXT(A2) is expected to return text 12, whereas =T(A2) is expected to return empty text. Both are registered by the same pinned text module but their implementations take different branches. This difference is especially important when migrating an Excel formula or converting values before string concatenation.

Inspect a suspicious imported field

Suppose cell A2 visually shows 007. Re-enter the field with text data type, then compare =TEXT(A2) with =T(A2). If T returns empty, the value probably is not stored as text. This is a conceptual type diagnostic, not a promise that both functions recognize every application-specific cell type or error case the same way.

Troubleshooting and limits

  • A "0.00" formatting string has no effect: the pinned func_text reads args[0] only, even though the dispatcher permits two parameters. Follow the one-parameter documentation; do not silently port Excel TEXT formatting.
  • 12.5 appears as 12,5 or another representation: locale and converter settings can affect decimal strings. The XML example is English. Check locale, storage type, and installed version.
  • A date serial appears instead of a friendly date: the pinned XML does not promise date formatting; test an actual date value and use a correctly supported formatting mechanism for display.
  • An imported 007 turns into 7: the data may already have been parsed as numeric. Preserving original identifiers requires a text import or explicit text storage.
  • An error in the argument: the displayed error and propagation are not established by merely examining func_text’s few lines; verify in the target application’s spreadsheet engine rather than inventing a return string.
  • Version/edition mismatch: installed distribution packages may lag the pinned KDE source; Windows support differs by package. This article refers to the 26.08.2 source contract, not every deployment.

The source implementation does not document character limits, rounding policy for all floating-point input, a format language, locale-specific date patterns or a default second argument; do not infer these from Excel. Function registration and XML presence are not native execution evidence.

Excel and LibreOffice differences: especially important

Microsoft’s Excel TEXT reference documents TEXT(value, format_text) and applies a required format string. LibreOffice Calc’s TEXT help likewise documents a formatting-operand form (TEXT(Value; Format)). In contrast, Calligra’s public TEXT handbook shows TEXT(value), while its 26.08.2 code admits but ignores a second argument. A worksheet imported from Excel or LibreOffice can therefore lose intended formatting semantics. Review formatting-sensitive formulas before relying on the output; compare actual native results for relevant source and destination versions.

This is a specific, source-supported incompatibility, not a claim that all three spreadsheet programs differ in every text conversion or that a newer Calligra build must behave the same.

NUM2STRING and STRING: two names, one conversion lesson

For a numeric input, Calligra also documents =NUM2STRING(value) and identifies STRING as the same operation. In the 26.08.2 release source, both names are registered separately with the same func_ToString callback. They are equivalent names for this operation, not two different techniques to learn. This guide covers both here rather than creating duplicate number-to-text articles.

Each takes exactly one required argument: the function constructor defaults to one argument, and neither registration changes that count. Neither name accepts a separate number-format argument in the inspected registration. The shipped XML describes a numeric input and a string result. It explicitly documents NUM2STRING(10) returning "10" and NUM2STRING(2.05) returning "2.05"; the latter is an English-help example, not a promise about every locale. The STRING entry refers readers to NUM2STRING rather than providing separate examples.

Both callbacks pass their argument to asString. TEXT also uses asString, then wraps the resulting string. Thus these numeric-conversion examples belong with TEXT, but this does not establish identical behavior for every type, error, array or imported formula. TEXT’s registration permits a second argument as discussed above; NUM2STRING and STRING do not.

Small integer control worksheet

Use a fresh worksheet with ordinary numeric cells, not date, time or percentage values. Enter 27 in A2, 0 in A3 and -8 in A4. Enter the three formulas below in row 2 and fill each down through row 4.

Column Formula in row 2 Expected text down rows 2–4
B =NUM2STRING(A2) "27", "0", "-8"
C =STRING(A2) "27", "0", "-8"
D =TEXT(A2) "27", "0", "-8"

These are source-derived expectations, not native-observed results. The simple signed-integer strings were independently checked; the inspected converter has a plain-integer branch that constructs a string from the integer. Quotation marks in the table identify text and are not characters to add to a numeric input. A result can look unchanged while its type changes, so visual similarity alone is not a conversion test.

Choose the right direction and avoid misleading examples

  • Use these functions when maintaining an existing formula that explicitly needs number-to-text conversion. KDE notes that automatic number-to-string conversion often makes an explicit NUM2STRING call unnecessary.
  • Use VALUE for the opposite direction, text-to-number parsing. It is not an interchangeable spelling, nor does a round trip prove that an imported field retained its original representation.
  • Do not add a formatting argument or expect this operation to rebuild lost leading zeros. Keep the original text identifier when its characters matter.
  • Do not extrapolate the plain-integer exercise to dates, percentages, decimal precision or localized output. Those require separate checks in the intended build and document settings.
  • The shipped NUM2STRING help also labels a nested FIND example as returning True. FIND’s implementation returns a position, so that help example is not used as a validated Boolean test here.

Evidence and scope: inspected October 22, 2026 in KDE’s official Calligra 26.08.2 source archive: sheets/functions/conversion.cpp (registrations and func_ToString), conversion.xml (NUM2STRING and STRING help), sheets/engine/Function.cpp (default arity), ValueConverter.cpp (string conversion), and sheets/functions/text.cpp (TEXT and FIND). This is release-source evidence, not an execution or screenshot on Linux, Windows or another platform; the behavior of particular packaged builds remains untested here. No original introduction date or other-program compatibility is asserted for these names.

The KDE TEXT reference, KDE T reference, KDE CONCATENATE reference and KDE LEFT reference support the documented formulas and purposes.

Validation: Official documentation, immutable source and independent example reasoning were checked. No native Calligra execution, platform/locale tests or workbook interchange tests were performed.