Changing the background color for a cells range

Hi,
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 ?

Thanks

Yes, you can use this overload of SetCellFormat:
https://doc.tmssoftware.com/flexcel/vcl/api/FlexCel.XlsAdapter/TXlsFile/SetCellFormat.html#txlsfilesetcellformatinteger-integer-integer-integer-tflxformat-tflxapplyformat-boolean

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)