Excel - Write Value Operation

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

The Excel - Write Value operation writes data to a cell in an Excel file.

Note: To work with Excel files in your tests, you do not need to have Microsoft Office Excel installed on your computer.

Operation Result

The operation returns True if the data was written successfully. Otherwise, it returns False.

Operation Parameters

When you add the operation to your keyword test, TestComplete displays the wizard that contains the following pages:

Specify Excel Parameters

On this page, you specify the location of the target file, the desired cell, and the data that will be written.

File name

Specifies the fully qualified file name. If the specified file does not exist, the operation will create a new one. However, the folder the new file is added to must exist.

Cell

Specifies the cell of an Excel file new data will be added to.

The Cell drop-down list shows the content of the specified Excel file if it is loaded correctly. You can select the desired sheet and cell from the drop-down list or type them manually.

Value

Content to write to the specified cell.

Parameters of the Excel - Write Value operation
Operation Parameters

On the Operation Parameters page, you can review the parameters you have created and change them if needed.

To change the operation parameter’s value, do one of the following:

  • Specify a new value in the Value column.

– or –

  • Click the ellipsis button in the corresponding cell of the Value column and edit the value in the subsequent dialog. For detailed information about possible values, see Specifying Operation Parameters.

Once you are ready, click Finish to apply the changes you have made and create a new keyword test item.

Remarks

  • The target Excel file must not be open in third-party programs during operation executions.

  • Excel files secured with passwords are not supported.

  • Operations save changes to Excel files during their executions, you do not need to add additional operations for these purposes.

See Also

Working with Microsoft Excel Files
Writing Data in Excel Files
Excel - Add Row Operation

Highlight search results