Re: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-08 Thread Mark Murphy
So you should start with the un-sorted spreadsheet, make a copy, then sort and save, then compare the two. You could also make an unsorted version manually with Excel, save a copy, sort it, and then compare all four to see how things got out of whack. On Thu, Mar 8, 2018 at 1:39 PM, Dagnon,

RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-08 Thread Dagnon, William
Excel -> select all rows -> sort -> select 2nd column, ascending 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

RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-08 Thread Murphy, Mark
How did you sort the rows? -Original Message- From: Dagnon, William [mailto:william.dag...@wpsic.com] Sent: Thursday, March 08, 2018 8:53 AM To: POI Users List Subject: RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS

RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-08 Thread Dagnon, William
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

Re: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-06 Thread Mark Murphy
The Cell Style overrides the Row Style. When you are setting a style in POI, no new styles are created. The style being set is used as is. Be careful of changing your style after you have used it. The change will affect every cell that the style has been applied to. Instead I manually create all

RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-06 Thread Dagnon, William
Perfect, thank you for the explanation and details - it worked! There is still the oddity about: > row.setRowStyle(codeFill) Only affecting cells AFTER the last one I created in the row. I've been using a limited work-around. Lastly: are row and cell styles ever

Re: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-02 Thread Mark Murphy
Ah yes, Fills. This is a bit tricky, but there are really three color levels in a cell. These are the Color (Font color), Foreground color (Fill color), Background color (Fill color). The Fill provides what we normally call the cell background, but the color terminology, Foreground Color /

RE: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-02 Thread Dagnon, William
1. after more experimenting: Nope, Excel skips displaying any Medium-thickness borders on Column “A”, but will at least display the others. Which is idiotic and negates any WYSIWYG of Excel. 2. background fill: yes, that works fine through Excel. Except I am generating files and cannot go

Re: POI 3.17 Problems with border and fill styles in generating XSSF/xlsx files, viewed in MS Office 365 ProPlus

2018-03-02 Thread Mark Murphy
Can you do what you want in Excel? Here is what it looks like when I add borders in Excel. The borders are re there though. If I look in Print Preview, it looks like this: So maybe what you are seeing is just the way Excel renders the borders you have created. On Fri, Mar 2, 2018 at 10:22