Skip to main content

Read from Excel worksheet

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

Retrieve the value of a cell or range of cells from an Excel worksheet. This command allows you to extract data from Excel by specifying a single cell, row, column, or range of cells and store the retrieved data into variables for further processing in your workflow.


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

Read from

Read Excel file by cell/row/column/range

A single cell, A single row, A single column, A range of cells

Yes

-

Row

Specify the row number

-

Yes*

Use 1 for the first row, or -1 for the last row

Column

Specify the column

-

Yes*

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C)

Start row

Specify the starting row number

-

Yes**

Use 1 for the first row, or -1 for the last row

End row

Specify the ending row number

-

Yes**

Use 1 for the first row, or -1 for the last row

Start column

Specify the starting column

-

Yes**

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C)

End column

Specify the ending column

-

Yes**

Use either a number (1 = first, -1 = last) or a letter (e.g., A, B, C)

Store Excel data into

Save the retrieved data into this variable

-

Yes

Variable name to store the extracted data

*Required when "Read from" is set to "A single cell"

**Required when "Read from" is set to "A range of cells"

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Read values as displayed

Read the value shown in Excel instead of the raw format

True/False

No

When checked, returns formatted values as displayed in Excel; otherwise returns raw values

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 produces a variable that contains the data retrieved from the Excel worksheet. Depending on the "Read from" selection:

  • When reading a single cell, the variable contains a single value

  • When reading a row or column, the variable contains an array of values

  • When reading a range of cells, the variable contains a two-dimensional array


Using Variables in Conditions

You can use the {x} notation or the variable icon to insert previously created variables into parameter fields. This is particularly useful when you need to dynamically determine which cell, row, or column to read based on previous operations in your workflow.

For example, you could use a variable to specify the row number based on a calculation or user input, allowing for dynamic data extraction from your Excel sheets.


Notes

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

  • If the specified worksheet name cannot be found, the command will result in an error.

  • When reading a single cell, both row and column parameters must be specified.

  • When reading a range of cells, all start/end row and column parameters must be specified.

  • Use row/column numbers or column letters consistently within your workflow for better readability.

  • The format of data returned depends on the cell type and whether "Read values as displayed" is enabled.

Did this answer your question?