I have a excel in which i have some columns which adds upto a end column total expences and that column value(expences total cell) decide which is the best row and according to it we have three colors green,red and blue( best green ,medium blue and red worst) .
I am doing it in ASPOSE cells . so any code rule would better fit in my case. thanks in advance.

You may try to add conditional formatting to your Excel spreadsheet to accomplish your task. See the following sample code (with comments) for your reference that demonstrates on how to implement "Color Scales" conditional formatting with rules for your needs.
e.g.
Sample code:
Hope this helps a bit.
You may also post your queries in the dedicated forum.
PS. I am working as Support developer/ Evangelist at Aspose.