Skip to main content

Trim Text

Some data sources can return textual data in a format that is not conducive to a report. For example, text strings may be returned with a fixed length or padded with spaces, which in the report will not display correctly.

This function trims the text from every cell in the Apply To range, writing the trimmed text to the corresponding cell based on the Placement. To overwrite the original text with the trimmed text, set the Placement cell to the top left corner of the Apply To range.

Settings

Text to Trim

Set to the text string to trim. A dropdown list provides some common characters to trim. The text string to trim can also be entered directly in this setting.

Trim From

This determines from where the text is trimmed: from the Left, from the Right, or Both from the left and right.

Example

A database table contains a column that is fixed to 32 characters which means that if any text is less than 32 characters it has empty spaces to fill the remaining characters. This column of data starts in cell $C$4. To trim the trailing spaces from these values:

Apply To

Cell

$C$4

Direction

Down

End

All cells are empty

Placement

Cell

$C$4

Type

Direct

Setting

Value

Text to Trim

Space

Trim From

Right