Set_color_range in excel

HI @krishbcd,
I try to understand you workflow. I think you are struggling to find out the last row index of excel.

try this one. It may solve your problem.

Thank you
Balamurugan.S