开发者

cell formating in Excel using HSSFworkbook POI API

I populated Excel worksheet using HSSFWorkbook. I am facing a problem in formatting a cell. I have two colummns with contain varying text sizes. If the row in Column B is not empty then the开发者_Go百科 text from Column A does not overlap that in Column B. However, If Column B is empty, the text in a row of column A appears to be continuing onto Column B which is not desired.

Can someone please help me how I can avoid text in Row 1 Column A not to continue onto Row 1 Column B? I do not want to use wrap because that would make the height of Row 1 inconsistent with the other rows. Also, I do not want to adjust the width of Row 1 to match the text size because that is not desired.

Thanks, H


Described behavior

If Column B is empty, the text in a row of column A appears to be continuing onto Column B

is a standard Excel behavior and has nothing to do with POI. So try first avoiding it in the Excel itself (putting a space in B column as trashgod advices would do) and than reproduce it using POI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜