Check color of cells dynamically

excel

#1

Hello every one )
I am looking for a solution to get item of cells in Excel that have red color.
For example, we have a table with 3 columns “Name”, “Cost” and “Date”. Rows have different colors (yellow, green, red). We need to get all Names in the red category.


How to get Row color in excel
#2

Have you tried using the activity Get Cell Color


#3

Yes . It requers a cell`s Name. Maybe you know how to input dynamic index of cells?


#4

Perform a read range first.
Add a datacolumn named color.
Then iterate over the datatable using foreach.
Withing the loop:
find the index of each row.
(the index of the row) + (Header offset row) will give you the excel row number.
By this you can get the row reference. your column i suppose is fixed.
Now generate the cell reference and use the get cell color activity and assign the value to the current row’s color column.

post the loop execution, use datatable.select method to filter out only those rows from the datatable where the color=red


#5

Could you tell me how I can get row index? And how I can replace ‘A1’ to ArowIndex?