2013-02-01 50 views
-1

我需要在单元格注释中添加多行。如何使用Apache POI如何使用apache POI在单元格注释中添加新行字符

防爆打破单元格批注行:

Comment = "This is comment 1"; 
comment = comment + "This is comment2"; 
comment = comment + "This is comment3"; 
cell.setCellComment(comment); 
+1

您是否尝试添加换行符? '“这是评论1 \ n”' –

回答

5

您可以使用\ n作为一个新的生产线。

Comment = "This is comment 1"; 
comment = comment + "\n This is comment2"; 
comment = comment + "\n This is comment3"; 
cell.setCellComment(comment); 
相关问题