apache poi 中的文本方向 [英] Text direction in apache poi
本文介绍了apache poi 中的文本方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使 Apache poi 中的文本方向为垂直.我试过垂直对齐.我无法获得所需的结果.我不想旋转文本.类似的东西:
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
推荐答案
您必须创建一个 cellStyle,其中您有一个方法 setRotation(short rotation).随后将 cellstyle 应用到您的单元格.
You have to create a cellStyle, where You have a method setRotation(short rotation). Subsequently apply the cellstyle to Your cell.
文档,用于 setRotationhttps://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFCellStyle.html#setRotation(short)
docs, for setRotation https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFCellStyle.html#setRotation(short)
这篇关于apache poi 中的文本方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文