As a follow-on: I created a cell style with a bottom and right border plus a background, then applied it to selective rows. It looks good when I generate the file.
If I sort the rows, the background color remains for the content rows - but the border style randomly disappears. In fact the last 2 columns only have content for rows with this style (w borders), but after sorting most of those columns just lose their borders: 7 rows keep borders, 4 lose the last 2 columns' borders, 14 lose all borders after the sort. Total 163 content rows. The border dialog within Excel shows this isn't just a visual artifact: missing borders are no longer set on those content rows. The rows which keep their borders after the sort doesn't correlate with the original position of rows with borders. I don't know if this is an Excel-ism or how much POI affects it. CONFIDENTIALITY NOTICE: This e-mail, including any attachments, may contain confidential, privileged and/or proprietary information which is solely for the use of the intended recipient(s). Any review, use, disclosure, or retention by others is strictly prohibited. If you are not an intended recipient, please contact the sender and delete this e-mail, any attachments, and all copies.