在Apache的POI文字方向 [英] Text direction in apache poi

查看:933
本文介绍了在Apache的POI文字方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让Apache的POI垂直文本方向。
我尝试垂直对齐。我没能得到想要的结果。
我不想旋转文本。
是这样的:

  T
Ë
X
ŧ


解决方案

您必须创建一个cellStyle,在那里你有一个方法setRotation(短轮伐期)。在cellstyle随后适用于您的细胞。

文档,对于setRotation
<一href=\"https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFCellStyle.html#setRotation(short)\" rel=\"nofollow\">https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFCellStyle.html#setRotation(short)

How to make the text direction in Apache poi as Vertical. I tried Vertical alignment. I am not able to get the desired results. I don't want to rotate the text. Something like :

T
E
X
T

解决方案

You have to create a cellStyle, where You have a method setRotation(short rotation). Subsequently apply the cellstyle to Your cell.

docs, for setRotation https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFCellStyle.html#setRotation(short)

这篇关于在Apache的POI文字方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆