CLEAN Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples

Text and Data Beginner ONLYOFFICE Spreadsheet Editor

Remove nonprinting characters from imported text; preserve a separate copy of the original value for auditing.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked

CLEAN function in ONLYOFFICE Spreadsheet Editor

Quick answer

Use =CLEAN(...) to remove nonprinting characters from imported text. The full official syntax is =CLEAN(text). This guide provides independently reasoned expected results, not results observed in ONLYOFFICE.

What it does and when to use it

CLEAN is useful when a CSV export hides tabs, newlines or other nonprinting characters inside identifiers. ONLYOFFICE describes it as removing nonprintable characters. That wording does not define an exhaustive Unicode list, so do not treat it as a security sanitizer or a promise to remove every zero-width or nonbreaking character. Official behaviour.

Exact syntax and arguments

=CLEAN(text)
Argument Required? Meaning Example
text Required One text expression or a single cell reference containing text to clean. A2 or CHAR(9)&"Code"

There are 1 required arguments and no documented optional arguments. The names inside the signature are placeholders: do not type text or number literally unless that is a defined cell/range name.

Version, edition, platform and locale applicability

This page is based on the unversioned English ONLYOFFICE Docs Spreadsheet Editor function catalogue and the function-specific official reference, accessed 2026-10-11 UTC. The direct function page confirms the signature described above; it does not state a first-supported build number. Therefore:

  • Docs web/server editor: documented in the current help, but no native execution on an installed Docs build was performed.
  • Desktop Editors: separate desktop changelog consulted; equivalence with any particular Desktop release is not established by the web-editor function article.
  • Mobile/editor integrations: no edition-specific function execution was tested; the current web help is not an exhaustive compatibility matrix.
  • Release context: the Docs changelog records Docs 9.4.0 on May 20, 2026 and the Desktop Editors changelog records Desktop 9.4.0 on May 19, 2026. Neither proves when this exact function was first introduced. Do not convert a changelog’s presence into an invented first-supported version.

All reproducible formulas below follow ONLYOFFICE’s English example convention: begin with =, use () and separate multiple arguments with commas. Literal text in a formula uses double quotes. The function insertion help demonstrates this syntax; Advanced Settings describes a selectable Formula Language and regional settings. Actual localized function spellings and argument separators must be checked on the target installation rather than assuming English settings or a universal semicolon rule.

Practice worksheet and reproducible inputs

Type the following into a blank sheet; formula inputs should be entered beginning with = so the control characters are actually present. Cells containing text are described literally; do not include the printed quotation marks.

Cell Input type Enter exactly Content intended
A1 Text Imported value Header
A2 Formula =CHAR(9)&"Invoice-104"&CHAR(10) Tab + Invoice-104 + line feed
A3 Text North Two ordinary spaces on each side of North
A4 Formula ="AB"&CHAR(13)&"CD" AB + carriage return + CD
A5 Formula ="SKU-77"&CHAR(9) SKU-77 + tab
A6 Formula ="alpha"&CHAR(10)&"beta" alpha + line feed + beta

CHAR codes 9, 10 and 13 describe conventional ASCII tab, line-feed and carriage-return control characters. This is a documented-function/independent-reasoning test case, not a screenshot or observed ONLYOFFICE output.

Step-by-step instructions

  1. Open a new worksheet and enter the exact values in the data table; check that values specified as text are not automatically converted to dates or numbers.
  2. In the specified output cells, enter the formulas below. Use the Function Arguments dialog (Formula tab) if direct typing is inconvenient.
  3. Compare results to the expected values and explanations; these are reference expectations and independently checked text/ASCII arithmetic, not native test observations.
  4. If an unexpected result appears, first inspect the original cell value, case and hidden spaces; then confirm formula language, separators, arguments, and installed editor version.
  5. Leave source data untouched and record any deviations before applying transformations to real records.

Worked examples: formulas and expected results

Enter in Formula Expected result Explanation
B2 =CLEAN(A2) Invoice-104 The outer tab and line feed are nonprinting and are removed.
B3 =CLEAN(A3) ␠␠North␠␠ Four ordinary spaces remain; ␠ denotes one visible space in this table, not a character returned by the formula.
B4 =CLEAN(A4) ABCD The carriage-return separator is removed, not replaced with a space.
B5 =LEN(CLEAN(A5)) 6 The cleaned identifier SKU-77 has six ASCII characters.
B6 =CLEAN(A6) alphabeta Removing a hidden line break can concatenate two words; decide if a space is semantically needed.

The examples intentionally avoid unverified high-byte character conversions and long Unicode sequences. Differences in target build, implicit coercion, regional settings, input data, line-break rendering or formula evaluation must be investigated rather than silently changing the expected answer.

Advanced practical applications

Clean before making a case-sensitive comparison

With the A5 value ="SKU-77"&CHAR(9), put literal SKU-77 (without quotes) in C5. Compare the raw import and the cleaned form:

=EXACT(A5,C5)
=EXACT(CLEAN(A5),C5)

Expected: FALSE and TRUE, respectively, for these exact ASCII inputs. The second result compares a cleaned value to the reference. EXACT is separately documented as case-sensitive. Do not silently normalize customer identifiers if a tab is meaningful.

Apply space trimming as a separate choice

=TRIM(CLEAN(A3))

Expected: North from A3, whereas =CLEAN(A3) preserves the four printable ASCII spaces. The ONLYOFFICE TRIM help describes removal of leading/trailing spaces. This second transformation is intentional, not part of CLEAN’s argument list.

Typical mistakes, limitations and edge cases

  1. CLEAN does not promise to insert a separator when a control character is removed. A newline between words may disappear and join the words.
  2. Ordinary spaces (CHAR(32)) are printable. Use TRIM separately when leading/trailing spaces, rather than control characters, are the problem.
  3. The ONLYOFFICE help does not enumerate every Unicode control or zero-width character that CLEAN removes. Test such characters natively on the target build instead of asserting cross-platform equivalence.
  4. Data that visually looks blank can contain tabs/newlines; inspect with a helper LEN column, not just the displayed cell.
  5. Nested formula errors or values of unexpected type may propagate in version-specific ways; no exact error code is claimed here because the CLEAN help does not specify one.

Troubleshooting when a result differs

  1. Formula appears as text: confirm the leading equals sign, formula cell type, and that pasted quotes use straight " characters, not curly quotes.
  2. Unexpected value: inspect the input with a helper LEN/CODE column or Show Formulas. Invisible characters and formatting can mislead visual inspection.
  3. Unknown function or syntax warning: choose the function from the current Formula tab and confirm its signature in the installed build; then verify English versus localized Formula Language and argument separators.
  4. Wrong result after copying: make sure cell references still point to the intended row; verify capitalization, spaces, and whether a referenced value is stored as a number or text.
  5. Different result from Excel: review the comparison below; do not attribute a difference to a vendor bug without a controlled native reproduction using the same inputs.
  6. Remaining disagreement: save a minimal workbook with raw inputs, the formula, edition/build number, operating system, chosen formula language, expected value and actual value; attach it to manual review.

The official function insertion guide also documents the Formula tab, function argument helper, Show Formulas and forced calculation. No browser action or screenshot was created for this guide.

Differences and transfer notes for other spreadsheet software

Excel: Microsoft’s CLEAN reference explicitly limits the historic cleaning target to ASCII codes 0–31 and warns that other nonprinting Unicode codes can remain. ONLYOFFICE’s CLEAN page says “nonprintable” without an exhaustive code-point table. This is a documentation specificity difference, not tested evidence that ONLYOFFICE cleans a wider or narrower set. Excel also documents the CLEAN(text) signature.

Other spreadsheet editors: A same-named formula in another editor is only a candidate for translation. Test a sample with tabs, line breaks, nonbreaking spaces and Unicode controls before asserting an identical cleaned result. The routine here is deliberately limited to common ASCII controls.

The following official ONLYOFFICE function references were checked for syntax or related workflow, not treated as verified live Spreadsheet-Tutorials.com URLs:

Official reference and verification

Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in ONLYOFFICE Spreadsheet Editor.

  • No genuine ONLYOFFICE Spreadsheet Editor screenshots are included; this guide does not use mock application images.