Skip to main content

Insert image into cell

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

This command inserts an image into a specified cell in an Excel worksheet. You can control the placement, sizing, and behavior of the image within the Excel environment.


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

Excel object

Yes

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

Worksheet name

Specify the worksheet name

Text

No

Leave blank for the active worksheet

Image path

Enter or select the path to the image

File path

Yes

Path to the image file to be inserted

Row

Specify the row number

Number

Yes

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

Column

Specify the column

Alphanumeric

Yes

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

Row height

Optional. Sets the height of the row in points

Number

No

Defaults to 14.25 in Excel (about 19px) and 13.5 in WPS

Column width

Optional. Sets the column width in characters

Number

No

Default: 8.38 in Excel and WPS

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Maintain original aspect ratio

Maintains the width-to-height ratio of the original image

Boolean

No

When checked, preserves the image's original proportions

Image behavior

Determines how the image responds to cell changes

Selection

No

"Moves and resizes with the cell", "Moves with the cell but does not resize"

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 the parameter fields by clicking on the {x} icon or inserting a variable reference. This is particularly useful when the image path or cell coordinates need to be dynamically determined during execution.


Notes

  • Before using this command, ensure that a valid Excel instance has been created and is active.

  • The image will be inserted at the top-left corner of the specified cell.

  • If you specify row and column values that are outside the worksheet's range, the command may result in an error.

  • For optimal results, ensure the image dimensions are appropriate for the cell size, or adjust the row height and column width parameters accordingly.

  • When "Maintain original aspect ratio" is enabled, the image will maintain its proportions regardless of cell dimensions.

Did this answer your question?