I want to apply two Set Range Color activities to the cells to make the excel looks like Format As Table color rows, so i need to apply this idea to even and odd index of the cells.
For example, the first one to apply for A3:K(index x 2), and the other one for A2:K(index x 2), something like that, but i can’t figure it out how is the syntax to do that.
Can you help me with this please? Thank you in advance!
Hi
Hope these steps would help you
—use a excel application scope and pass the file path of the excel
—inside the scope use a READ RANGE activity and get the output with a variable of type datatable named dt
—use a while loop and mention the condition like this counter <= dt.Rows.Count-2
Where counter is a variable of type int32 with default value as 0
—inside the loop now use a set range color activity
And in the range mention as ”A1:K”+counter.ToString
—next to this set range color activity use a assign activity like this counter = counter + 2
Where counter is a variable of type int32 with default value as 2 defined in the variable panel
I did all these steps, but because i write him the first index in range, in my case A2 for even rows and A3 for odd rows, the colors from those 2 set range color activities are overlapping, because at every iteration it’s starting with A2 or A3:
However, i was inspired by your solution, and i came up with this one: