In the attached file there is Conditional Formatting applied to the range C5:M5. The conditional formatting uses the formula: =ABS(C5-$P$5)=MIN(ABS($C$5:$M$5-$P$5))
The MIN(ABS($C$5:$M$5-$P$5)) portion of this formula appears to be causing an error, presumably because it is a Spill formula. If the MIN(ABS($C$5:$M$5-$P$5)) section is moved to a cell formula instead and then that cell is referenced in the conditional format then it works properly.
To see the issue run the code below. The PDF file will show that Aspose did not apply the conditional formatting properly. Opening the output Excel file will show the correct result, because Excel will re-evaluate the formatting (properly) when the file is opened.
[Test]
public async Task foo52()
{
var workbook = new Workbook(@"ConditionalFormattingError.xlsx");
workbook.Worksheets.First().Cells["P5"].PutValue(1.01);
workbook.Save(@"out.pdf", SaveFormat.Pdf);
workbook.Save(@"out.xlsx");
}
@weissa
By testing with sample files and code on the latest version v24.8, we can reproduce the issue. Discovered that conditional formatting with spill formula doesn’t execute properly when saving sample file to PDF.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-56588
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@weissa
We are pleased to inform you that your issue has been resolved. The fix will be included in our upcoming release (Aspose.Cells for .NET 24.9) that we plan to release in the first half of September 2024. You will be notified when the next version is released.
The issues you have found earlier (filed as CELLSNET-56588) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi