Contact

SLEEK Function (Calligra Sheets)

Text Intermediate Calligra Sheets

Remove whitespace with SLEEK in Calligra Sheets. See spaces, tabs and line breaks, the zero-width-space exception and exact text-conversion results.

Verification status: 16 selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library in the C locale. Exact typed outputs and source-derived checks are documented; 26.08.2 was source-checked only. No GUI-cell or import claim. How formula examples are checked

Quick answer: =SLEEK(" A B C ") returns "ABC" in the tested engine.

Availability and version history

  • Introduced: First release not established; the name is present in Calligra 2.4.0 source.
  • Supported in: Calligra Sheets 26.08.2, with the limitations described here; no retirement established.
  • Scope: Desktop Sheets with the Text module. Formulas use English names and semicolon separators.
  • Checked: October 14, 2026: selected 25.04.2 engine-library formulas and independent reconstructions; 26.08.2 source only. The test locale was C. No GUI-cell, import or other-locale execution is claimed.

What SLEEK returns

SLEEK removes characters classified as whitespace by the underlying character library, wherever they occur in the string. It removes internal spacing as well as leading and trailing spacing. This is useful for compact identifiers, but it can destroy meaningful word boundaries. Official function reference.

Syntax and arguments

=SLEEK(text)

text is the single required argument. The implementation converts the value to a string and copies only characters for which QChar::isSpace() is false. It does not merely trim the ends. Registration and implementation.

Reproducible engine examples

Quotation marks identify text results; error tokens without quotes are actual errors. Numeric results are rounded here to twelve decimal places. The reconstruction column applies independent decimal arithmetic or the inspected character/parser rules, rather than claiming another application test.

Formula Engine result Independently reconstructed expectation
=SLEEK(" A B C ") "ABC" "ABC"
=SLEEK("NoSpaces") "NoSpaces" "NoSpaces"
=SLEEK(" ") "" ""
=SLEEK("") "" ""
=SLEEK("A"&CHAR(9)&"B") "AB" "AB"
=SLEEK("A"&CHAR(10)&"B") "AB" "AB"
=SLEEK("A"&CHAR(160)&"B") "AB" "AB"
=SLEEK(" A B-C ") "AB-C" "AB-C"

Practical worksheet

For an identifier written as A B C, enter that text in A2 and use =SLEEK(A2). The result is ABC. Keep the original field beside the cleaned field until you confirm that spacing is insignificant. Applying this to a person’s name or a sentence would join the words and may change the meaning; TRIM is a different tool when internal word separation should remain.

Advanced interpretation and checks

The tested removals include ASCII space, tab U+0009, line feed U+000A, nonbreaking space U+00A0 and ideographic space U+3000. The formulas using CHAR make those inputs reproducible without relying on an invisible pasted character.

Zero-width space U+200B is different: =SLEEK("A"&CHAR(8203)&"B") retains it between A and B. The resulting string has three characters even though the middle character may be invisible. SLEEK is therefore not a general “remove every invisible character” function. If a specific import contains another code point, identify that character explicitly rather than assuming all visually blank characters share the same classification. The executed length check below confirms the ordinary spaced-identifier result has three characters.

=LEN(SLEEK(" A B C "))

The executed result was 3.

Boundaries and troubleshooting

Empty text and all-space text both produce an empty string, not a numeric zero. Hyphens and other non-space punctuation are retained. The boundary table describes the zero-width character with its code point so that its survival is visible even if the font cannot show it.

The conversion stage matters: numeric 123 becomes text 123, TRUE becomes true, and 1/0 becomes a successful string containing #DIV/0!. That last result is not an error value. Validate source cells before cleaning them if an upstream error must stop your calculation. Missing or extra arguments produced #VALUE! in the engine tests.

Formula Engine result
=SLEEK("A"&CHAR(12288)&"B") "AB"
=SLEEK("A"&CHAR(8203)&"B") "A\u200BB"
=SLEEK(123) "123"
=SLEEK(TRUE()) "true"
=SLEEK(1/0) "#DIV/0!"
=SLEEK() #VALUE!
=SLEEK("A";"B") #VALUE!

Official evidence and precision scope

The complete selected callback is byte-identical in the inspected 25.04.2 and 26.08.2 sources. The text module has an unrelated SEARCH change; whole-file equality is not claimed. The locale helpers are byte-identical. These comparisons do not establish execution of the later release.