activities
latest
false
UiPath logo, featuring letters U and I in white

Productivity Activities

Last updated Jun 4, 2025

Filter Excel files by cell color

The Filter Table activity only filters Excel columns by input values, and not by color. As an alternative, use the following approach to filter Excel files by color:
  1. Manually add a column named Color in the Excel sheet you want to filter.

    This column will store the cell color value in text format.

  2. Enter the color name in text format in a cell, under the Color column you previously created.
  3. Use a Read Range activity to get the datatable. Notice the offset of the selected range relative to the sheet, as this is required later.
  4. Use a For Each Row activity to iterate over the datatable.
  5. Add a variable, for example, rowIndex, to the Index output property.
    1. Within the loop, build the cell ID using the index of the current row. For example, the expression B + (rowIndex + 3).ToString() retrieves the row number, offsets it according to the range used, and builds the cell ID located in the current row and column B.
    2. Use the Get Cell Color activity to get the cell color.
    3. Write the color as a string or an integer of ARGB value in the Color column of the current Excel row.
  6. After the loop executes, use the Filter Table activity to filter the required color, where the color name is passed as the input.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2025 UiPath. All rights reserved.