How to highlight last row in excel?

I dont know the number of rows, and i want to highlight the last row of the excel with yellow color or green. I want to format the first row of the excel to BOLD. How can i do this in Uipath?

Hi @vicky1234567890

Do the datatable.rows.count.tostring

Check this

new_DT = DT_input.asenumerable.reverse().take(1).copytodatatable


To change the color, you can use the activity Set Range Color - place “system.Drawing.Color.Yellow” in Input ->Color.

any idea for changing the format from normal to bold?


Perhaps this can be achieved e.g. when the spreadsheet is open (Excel Application Scope has “visible” option checked), your first row is selected e.g. with Select Range, and you apply “Send hotkey” ctrl+b


Check with this package and activity, then you can do it.