We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conditional formatting formulas with fixed column using $

I’m trying to set a conditional formatting rule based on a cell with a fixed column but dynamic row (i.e. $B16) but I’m getting this exception: “Exception in thread “main” com.aspose.cells.CellsException: Invalid name: $B16”

This is the code snippet where I’m setting the formula

Style euro = pvtsheet.getCells().get(“G1”).getStyle();
currency.setFormula1("=IF(FIND(“SPS”,$B16)>0,1,0)", true, false);

Does aspose cells not support the use of the $ to fix the column in a formula?

For some reason it works when you use the addCondition method for FormatConditionCollection so my problem is fixed, but can this behavior be explained?


Thank you for your query.

Please send us the complete sample code (both with and without issue) that can be compiled and executed here. We will re-produce this issue and provide assistance about it.

Just tested again and it’s working. I might have been doing something weird earlier, but both methods seem to work!


Thank you for the feedback.