Bug 49524 - add vertical text orientation method
Summary: add vertical text orientation method
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-dev
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 13:17 UTC by charlie.chang5
Modified: 2010-07-18 14:01 UTC (History)
0 users



Attachments
screen shot (43.52 KB, image/jpeg)
2010-06-29 13:17 UTC, charlie.chang5
Details
normal text (13.50 KB, application/vnd.ms-excel)
2010-07-16 12:21 UTC, charlie.chang5
Details
rotated text (vertical) (13.50 KB, application/vnd.ms-excel)
2010-07-16 12:22 UTC, charlie.chang5
Details

Note You need to log in before you can comment on or make changes to this bug.
Description charlie.chang5 2010-06-29 13:17:23 UTC
Created attachment 25660 [details]
screen shot

in excel, there's an option to let text go vertically (Format->Cell->Alignment->Orientation), ie:

T
E
X
T

this option is especially helpful for Asian Text.  The setRotation() method in HSSFCellStyle does NOT quite do the trick.  it would be nice if future POI HSSF can include a method to set text vertically.
Comment 1 Nick Burch 2010-07-16 12:09:59 UTC
Could you please upload two simple files, created in excel?

One is a file with one sheet, one row. Two cells, both with the same text in them, and both in the normal direction

Then, save-as that file, rotate the text in one cell but not the other, and save that.

If you could upload those two files, we'll have something to work off to spot how excel does it, and something to unit test against
Comment 2 charlie.chang5 2010-07-16 12:21:29 UTC
Created attachment 25772 [details]
normal text

One is a file with one sheet, one row. Two cells, both with the same text in them, and both in the normal direction
Comment 3 charlie.chang5 2010-07-16 12:22:54 UTC
Created attachment 25773 [details]
rotated text (vertical)

Then, save-as that file, rotate the text in one cell but not the other, and save that.
Comment 4 charlie.chang5 2010-07-16 12:24:55 UTC
information added.  2 excel files as attachments.  thanks alot for the response.
Comment 5 Nick Burch 2010-07-18 14:01:56 UTC
Thanks for the test files, they showed the trick

Now fixed in r965267. You can now do cellStyle.setRotation(0xff) to request vertically orientated text