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

Free Support Forum - aspose.com

Conditional Formatting does not applied in saved document

Dear All,

I`m having problems with conditional formatting of cells.
The problem is that when u have conditional formatting on cell (for example if value is greater than 5 cell has to be filled in red) and in original document u have value 3 (so cell is not filled in red), after in code u are only changing the value of the cell from 3 to 6 and save document (we dont do any manipulations with document in code, except of changing value of cell and save document) - the value is changed, conditional formatting is present for the cell, but cell is not filled in red. Conditional formatting applies fill in red only after u click on the cell and press “Enter”

I have version of Aspose.Cells 19.9.0

Thank u in advance.
Best regards

@tolexandr,
I have tried to reproduce this issue using one of my sample file and following sample code but could not observe any issue in the output file. When this output file is opened in Excel 365 at my end, it properly highlights the target cell according to the value in it without clicking anywhere. Could you please give it a try using the latest version Aspose.Cells for .NET 19.11 and share your feedback.

Workbook workbook = new Workbook(path + "book1.xlsx");
workbook.Worksheets[0].Cells["A1"].Value = 20;
workbook.Save(path + "output.xlsx");

output.zip (6.6 KB)
Book1.zip (6.1 KB)

My test environment:

  • Windows 7
  • Excel 365
  • Visual Studio 2019
  • .NET Framework 4.5.2
  • Aspose.Cells library v19.11 from NuGet package manager

@ahsaniqbalsidiqui
Yep, with version 19.11 it works fine

Thank u

@tolexandr,
You are welcome.