Delete all values for cells range

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

Is there a way to delete all values for cells range but keeping the cells formatting ?
Something like
xls.DeleteValueRange(BeginRow, BeginCol, EndRow, EndCol);

Not DeleteRange obviously. I don't want to delete rows or colomns.

Thanks

Not DeleteRange obviously. I don't want to delete rows or colomns.

It actually is DeleteRange :slight_smile: FlexCel was designed to have very little methods for manipulating cells, but those methods do a lot of different stuff depending on the parameters you use.

In particular, for your case you should use this overload of DeleteRange, setting insertMode to TFlxInserMode.NoneDown (it could be NoneRight too, for this case it doesn't make a difference), and setting the removeFormats parameter to false.

https://doc.tmssoftware.com/flexcel/vcl/api/FlexCel.XlsAdapter/TXlsFile/DeleteRange.html#syntax-1

I missed the RemoveFormats parameter.
Thanks Adrian.