Skip to main content

Clear cell format

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Clear all formatting (e.g., number format, font, alignment, fill) from the specified cell range while preserving the cell values. This command allows you to reset the formatting of cells in an Excel worksheet without affecting the underlying data.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Excel instance

Please select an Excel instance to identify the instance to operate on

-

Yes

Must be created via the "Launch Excel" or "Get active Excel worksheet" command

Worksheet name

Specify the worksheet name

-

No

Leave blank for the active worksheet

Reference range

The target cell or range to clear format

Cell, Row, Column, Range, Used range

Yes

-

Row

Specify the starting row number

-

Yes*

Use 1 for the first row, or -1 for the last row; *Required when Reference range is "Cell", "Row", or "Column"

Column

Specify the column

-

Yes*

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C); *Required when Reference range is "Cell", "Row", or "Column"

Starting row

Specify the starting row number

-

Yes*

Use 1 for the first row, or -1 for the last row; *Required when Reference range is "Range"

Ending row

Specify the ending row number

-

Yes*

Use 1 for the first row, or -1 for the last row; *Required when Reference range is "Range"

Starting column

Specify the column

-

Yes*

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C); *Required when Reference range is "Range"

Ending column

Specify the column

-

Yes*

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C); *Required when Reference range is "Range"

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables in any parameter field where you see the {x} icon. This allows you to dynamically define cell references, worksheet names, or Excel instances based on previously defined variables in your workflow. For example, you could use a variable to specify which row or column to clear formatting from based on user input or previous operations.


Notes

  • Before using this command, ensure that a valid Excel instance has been created and the target file is open.

  • The command only removes formatting while preserving the actual cell values.

  • Different parameters are required depending on which Reference range option you select:

    • For "Cell", "Row", or "Column" options, you'll need to specify the Row and Column parameters.

    • For "Range" option, you'll need to specify the Starting row, Ending row, Starting column, and Ending column parameters.

    • For "Used range" option, no additional parameters are required as it will clear formatting from all cells containing data.

Did this answer your question?