Changing the background color for a cells range

I didn't find a solution in existing topics...

Is there a way to change the background color only for a cells range but keeping the cells values, formulas and font colors ?


Yes, you can use this overload of SetCellFormat:

There is an "applyFormat" parameter where you can specify what parts of the format to apply (in this case it would be just the background color, all other members of applyFormat should be false)

You can see an example here: Advanced API (Delphi) | FlexCel Studio for VCL and FireMonkey documentation (search for applyFormat in the code)