跳到主要内容

TRIM

Removes all spaces from a text string except for single spaces between words.

Syntax

expression.TRIM(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRangeApiNamestring

Returns

string

Example

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.TRIM(" Online Office"));