EXCEL Trim column whitespace function

The EXCEL Trim column whitespace function in RPA.

Help CentreBuilding Processes

This article describes the RPA Excel functionality to trim whitespace from a column.

For a full list of available functions, please read EXCEL functions.


Description

The Trim column whitespace function strips leading and trailing whitespace (spaces, tabs) from all cells in a column. This is essential for data cleaning – extra whitespace can cause lookups, comparisons, and deduplication to fail silently.


Example

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

Setting it up

To use the Trim column whitespace function, follow these instructions:

{{popups:rpas/add:action=excel-trim}}

Once on a process map:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down
  3. Click on “+ Activity”
  4. Select the EXCEL Trim column whitespace option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
File pathYesTextFull path to the Excel file.
SheetYesTextName of the sheet containing the column.
ColumnYesTextThe name of the column to trim. Leading and trailing whitespace will be stripped from all cells.

Output

This function does not return a value. It modifies the sheet in place.


Errors

  • Column not found – the specified column name does not exist in the sheet

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

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.