mirror of https://github.com/apache/poi.git
[bug-64732] add support for new line escaping when updating table names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aeab91dce5
commit
134b7c1be5
|
@ -803,7 +803,10 @@ public class XSSFTable extends POIXMLDocumentPart implements Table {
|
|||
for (CTTableColumn col : ctTableColumns.getTableColumnList()) {
|
||||
XSSFCell cell = row.getCell(cellnum);
|
||||
if (cell != null) {
|
||||
col.setName(formatter.formatCellValue(cell));
|
||||
String colName = formatter.formatCellValue(cell);
|
||||
colName = colName.replace("\n", "_x000a_");
|
||||
colName = colName.replace("\r", "_x000d_");
|
||||
col.setName(colName);
|
||||
}
|
||||
cellnum++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue