poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Watson <blake.wat...@pnmac.com>
Subject Re: ConditionalFormattingEvaluator.getConditionalFormattingForCell: slow?
Date Tue, 23 Jan 2018 21:32:33 GMT
OK, FWIW, I did this:

1. I get all the rules on the sheet...
2. ...and map the rules to their formatting...
3. ...then call getMatchingCells for each rule...
4. ...and create a map of cells to formatting...
5. ...then merge the maps for all rules...

I ended up with a hash-map of cell=>formatting that is much faster (20x) to
reference for each cell than calling .getConditionalForCell. (That's for
one 800 cell sheet on a smallish spreadsheet of about 70K with three simple
conditional formatting rules.)

If I can Java-ize it, it might be worth putting into a utility unit.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message