Skip to main content

CLEAN

Removes all the nonprintable characters from the text.

Syntax

expression.CLEAN(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | stringA string from which nonprintable characters will be removed.

Returns

string

Example

This example shows how to remove all the nonprintable characters from the text.

// How to remove all the nonprintable characters from the text.

// Use function to clean all nonprintable characters.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.CLEAN("\ntext"));