ReferenceFunctionsText Functions
CLEAN
CLEAN: Removes non-printable ASCII control characters from text.
Summary
Removes non-printable ASCII control characters from text.
Remarks
- Characters with codes
0..31are removed. - Printable whitespace like regular spaces is preserved.
- Non-text inputs are coerced to text before cleaning.
- Errors are propagated unchanged.
Examples
Strip control characters
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
AB
Printable spaces remain
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
A B
Related functions
FAQ
Does CLEAN remove normal spaces or only control characters?
It removes only ASCII control characters (0-31); regular printable spaces remain.
Runtime metadata
Category
Text
Signature
CLEAN(arg1: Any)Arity
min 1, max 1
Arguments
arg1Any · Scalar
Caps
PURE
Source