> > > > > > Note the dxfId="1" attribute of the cfRule bean. It is a format index in > the > > style table and you should be able to get the font information as > follows: > > > > CellStyle style = workbook.getCellStyle(dxfId); > > > > I was digging more and found the dxfId, but I wasn't sure how to get > to the style. Are you sure about the workbook.getCellStyle() ? I don't > seem to get the right style this way. > > The long way seems to work: > > CTDxf dxf = > sheet.getWorkbook().getStylesSource().getCTStylesheet().getDxfs().getDxfArray((int) > rule.getDxfId()); > > Correct.
Sorry for the confusion, I mixed up the "s" and "dxfId' attributes. The first one indicates the index of this cell's style. The dxfId attribute is for "differential formatting index " and it points to a CTDxf element, exactly as in your code snippet. The dxf formatting is to be applied on top of or in addition to any formatting already present on the cell, that is, to display a cell you need to first apply this cell's style and then calculate conditional formatting and apply the dxf style. Yegor
