WorksheetFunction.Clean Method

Removes all nonprintable characters from text.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Clean ( _
    Arg1 As String _
) As String
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As String
Dim returnValue As String

returnValue = instance.Clean(Arg1)
string Clean(
    string Arg1
)

Parameters

  • Arg1
    Type: System.String

    Any worksheet information from which you want to remove nonprintable characters.

Return Value

Type: System.String

Remarks

Use Clean on text imported from other applications that contains characters that may not print with your operating system. For example, you can use Clean to remove some low-level computer code that is frequently at the beginning and end of data files and cannot be printed.

Important

The Clean function was designed to remove the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31) from text. In the Unicode character set, there are additional nonprinting characters (values 127, 129, 141, 143, 144, and 157). By itself, the Clean function does not remove these additional nonprinting characters.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace