Change excel row color

Hi,

Can anyone tell me how to change specific excel row color using linq in UiPath studio.

Please share your thoughts

Hi @Nisha_K21

Refer the below video,

https://www.youtube.com/watch?v=EGXkGFx1yyc

Try this activity

Regards,
Gowtham K

1 Like

Not possible! LINQ is for data manipulation and not for format manipulation. When you read any data to datatable, the colors and fonts etc. cosmetic things don’t get read.

Use Format Cells activity to update the cell/range color in the excel. Another option use VBA macro. Only these two possible approaches.

1 Like

@Nisha_K21 ,

You can use Set Range Color activity to change excel row color.

  1. Find row index
    rowIndex = dt.AsEnumerable().Select(Function(row, index) New With {row, index}).Where(Function(x) x.row(“ColumnName”).ToString = “SomeValue”).Select(Function(x) x.index + 2).FirstOrDefault()
  2. Use Set Range Color to Color the Specific Row:
    In the Set Range Color activity, use the following:
    Range: For example, if rowIndex is 5, set the range as “A” + rowIndex.ToString + “:Z” + rowIndex.ToString (replace “Z” with the last column letter of your sheet).
    Color: Select the color you want to apply to the row

Hope this helps

2 Likes

Got it @ashokkarale
Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.