Bug 58224

Summary: Re-statement of bug 56981 - horizontal and vertical alignment do not work when read with OpenOffice
Product: POI Reporter: Eric <ericwest838>
Component: XSSFAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 3.13-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 56981    
Attachments: Generates an XSSF spreadsheet with various cell alignments

Description Eric 2015-08-07 21:46:31 UTC
Created attachment 32982 [details]
Generates an XSSF spreadsheet with various cell alignments

This is a re-statement of bug number 56981 because 56981
is incomplete.  This may actually be an OpenOffice/LibreOffice bug.
Horizontal and Vertical cell alignment does not work correctly
in XSSF spreadsheets.  I am using POI 3.13 Beta1, and both the latest
versions of OpenOffice and LibreOffice (as of 8/7/15).  The cell alignments
**do work correctly** with MS Excel, leading me to believe it may be
an Open/LibreOffice bug.  The attached code generates a spreadsheet
with left/center/right and top/center/bottom horizontal and vertical
alignment. (9 cells total). If you look at it with OpenOffice, it is
obviously wrong.  With MS Excel it is correct.
Comment 1 Nick Burch 2015-08-07 21:54:44 UTC
Can you try generating a file with that alignment in Excel? If so, then try loading it in AOO/LO and see how it looks? And load it in POI, read back the alignments, and see what POI sees?
Comment 2 Eric 2015-08-07 23:13:32 UTC
(In reply to Nick Burch from comment #1)
> Can you try generating a file with that alignment in Excel? If so, then try
> loading it in AOO/LO and see how it looks? And load it in POI, read back the
> alignments, and see what POI sees?

If I read the file into Excel and then save it, it will then read correctly
in Libreoffice.  Also, if I just read the file back into POI, the cell 
alignments are correct.