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

Java 如何使用ApachePOI在单元格注释中添加新行字符,java,apache-poi,Java,Apache Poi,我需要在单元格注释中添加多行。如何使用ApachePOI在单元格注释中换行 例: 您可以将\n用于新行 Comment = "This is comment 1"; comment = comment + "\n This is comment2"; comment = comment + "\n This is comment3"; cell.setCellComment(comment); 你试过添加新行吗“这是注释1\n” Comment = "This is comment 1"; c

我需要在单元格注释中添加多行。如何使用ApachePOI在单元格注释中换行

例:


您可以将\n用于新行

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

你试过添加新行吗<代码>“这是注释1\n”
Comment = "This is comment 1";
comment = comment + "\n This is comment2";
comment = comment + "\n This is comment3";
cell.setCellComment(comment);