Excel: Trim column whitespace

Strip leading and trailing whitespace from all cells in a column.

Help Centre › Building Processes

Strip leading and trailing whitespace from all cells in a column.

Runs on: macOS and Windows only.

Add it to a process

In the process designer, open the Add step tab. Find Trim column whitespace under Excel › Columns, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
File pathNoEnter the file path, or use a variable such as {folders::desktop::path}\file.xlsx. Leave blank to use the workbook an earlier step opened.
SheetYesName of the sheet in the Excel file. Supports wildcards: * matches any characters.
ColumnYesThe name of the column to trim. Leading and trailing whitespace will be stripped from all cells.

See all Excel steps.

Example

BeforeAfter
Acme Corp Acme Corp
Beta Inc Beta Inc
Gamma LtdGamma Ltd

Tips

  • Run this before lookups, deduplication, or comparisons to avoid mismatches caused by invisible whitespace
  • This only removes leading and trailing whitespace – spaces within the text are preserved

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.