如何使用apache POI在单元格注释中添加新行字符

Siv*_*udi -1 java apache-poi

我需要在单元格注释中添加多行.如何使用apache POI打破单元格注释中的行

例如:

Comment = "This is comment 1";
comment = comment + "This is comment2";
comment = comment + "This is comment3";
cell.setCellComment(comment);
Run Code Online (Sandbox Code Playgroud)

Nir*_*rma 5

您可以使用\n作为新行.

Comment = "This is comment 1";
comment = comment + "\n This is comment2";
comment = comment + "\n This is comment3";
cell.setCellComment(comment);
Run Code Online (Sandbox Code Playgroud)