Unstructured Text
Trim Text
Remove spaces and tabs from the beginning and end of each line, while leaving the spacing inside lines alone.
When to use it
Typical uses: Cleaning spreadsheet columns before matching or looking up values; Removing indentation from copied code or quotes; Preparing tags, keywords or IDs for import.
In a pipeline
Text InputTrim TextText Output
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Text column | select | — | Text |
| Generate New Column | checkbox | — | false |
| New Column Name | text | — | Default: <column> Result |
| Insert After | select | — | After the column |
| When a value cannot be converted | select | — | stop |
Example
Trim Text: an example
| Text |
|---|
| indented line trailing spaces here tabbed and spaced |
| Text |
|---|
| indented line trailing spaces here tabbed and spaced |
Worth knowing
- Does trimming remove blank lines? No. Blank lines stay, but any spaces on them are removed. Use Remove Empty Lines to delete them.
- Is the space between words changed? No. Only whitespace at the very start and end of each line is removed.
- What is the difference from Remove Extra Spaces? Trim Text only touches the edges of each line. Remove Extra Spaces also collapses repeated spaces inside lines.
- Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.