Skip to main content
Version: On-Premise 2.4

Create a Workflow to Read and Replace Cells in Excel

Actions Express stores and retrieves data using tables with pre-built activities to read and write to individual cells. This guide explains how to loop tables in your workflows from Excel files.

Read and Write Excel Files

To use an activity to read and replace cells in a preexisting Excel file:

  1. Add activity ReadXLS and provide a name.
    • In the Path field, add the full file path of your Excel file.
    • In the Host Name field, click the + sign to add your target host where the file is stored.
note

When clicking the + sign to add the target host, you must Configure New Device.

  1. In the Name field, add your device name.
  2. In the Platform field, select your platform from the dropdown menu.
  3. Save and close.
  1. Add activity GetRowsCount and add a name.
    • In the Table Variable field, add the name of your ReadXLS activity in the form of a variable.
  2. Add a While condition to create a while-loop and create a name.
    • In the Counter field, add a name, such as %tablerowcount%.
  3. Add activity GetCellValue and name it.
    • In the Table Variable field, add the name of your ReadXLS activity.
    • In the Row Number field, add the name of your While condition.
    • In the Column Type field, select Name.
    • In the Column Number/Name Field, add Status.
  4. Add an If-Else condition.
    • Configure the left branch.
      • In the Type field, select User Defined.
      • In the Condition Type field, select Formula.
      • In the Value field, type in the name of your GetCellValue activity as a variable and set it equal to the term to be used as a replacement. (Example: %GetCellValue% = 0)
    • Under the left branch, add the activity SetCellValue and name it.
      • In the Table Variable field, add the name of your ReadXLS activity.
      • In the Row Number field, add the name of your While condition as a variable.
      • In the Column Type section, select Name and add Status in the corresponding field.
      • In the New Value field, add the value you'd like to use as a replacement.
  5. Add activity WriteXLS outside of the if-else loop and name it.
    • In the Table Variable field, add the name of your ReadXLS activity.
    • In the Path field, add the path to the updated file.
    • In the Host Name field, add your host.
  6. Save and run the Workflow.