Hi.
Hi Alexey,
Thanks for your posting and using Aspose.Cells.
Currently, this feature is not available in Aspose.Cells. We will analyze it and implement it if possible. We have logged a New Feature request for this issue. Once, there is some fix or other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40689.
Many thanks!
Hi Alexey,
Thanks for considering Aspose.Cells.
We have looked into this feature and we are afraid, we cannot support this feature because it is too difficult to implement it. Thanks for your understanding.
Ok Faiz.
Hi Alexey,
Thanks for your posting and using Aspose.Cells.
Currently, you can iterate the conditional formatting collection and parse the formulas if it could fit your needs. Please see the following code and its output. It used the same source file as you have provided.
Java
String filePath = “F:\Shak-Data-RW\Downloads\conditional+formatting.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.getWorksheets().get(0);
ConditionalFormattingCollection cfc = worksheet.getConditionalFormattings();
FormatCondition fcc = cfc.get(0).get(0);
System.out.println(fcc.getFormula1());
Output:
=$B$3>10
Thanks, but it is not what we needed.
Hi Alexey,
Thanks for your posting and using Aspose.Cells.
It seems, you are again demanding the last affected cells which should return cells B3:I3 when value of the cell I3 is changed to Red or Yellow.
Similarly, when the cell I4 is changed to Red or Yellow, B4:I4 cells are affected.
As we mentioned earlier, it is a difficult feature for us so we cannot implement it.
Hi Alexey,
Thanks for using Aspose.Cells.
We are afraid, we do not provide license for retrieving a source code. Please see the following code if it is any helpful. The code retrieves all the format conditions that have been applied on cell B3. Similarly, you can retrieve the format conditions applied on any cell in this way.
Java
String filePath = “F:\Shak-Data-RW\Downloads\Conditional.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(“B3”);
FormatConditionCollection fcc = cell.getFormatConditions();
for (int i = 0; i < fcc.getCount(); i++)
{
System.out.println(fcc.get(i).getFormula1());
}
=$I3=“Yellow”
=$I3=“Red”