https://issues.apache.org/bugzilla/show_bug.cgi?id=55800
Bug ID: 55800
Summary: cloneStyleFrom(CellStyle cellStyle) creates error
"Unreadable content".
Product: POI
Version: 3.9
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31058
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31058&action=edit
Full java code of this copy.
Source file: InStyleSheet.xlsx (existing)
Destination file: Output.xlsx (not existing yet)
Create new file Output.xlsx
Write data value to cell A1.
Clone CellStyle in cell A1 of InStyleSheet.xlsx to apply on A1 of Output.xlsx
This is done by using:
Cell oldCell = inpWb.getSheetAt(0).getRow(0).getCell(0);
CellStyle cellStyle = outWb.createCellStyle();
cellStyle.cloneStyleFrom(oldCell.getCellStyle());
newCell.setCellStyle(cellStyle);
Save Output.xlsx and exit.
Error:
Java: no error.
Excel: Complains: Excel found unreadable content in "Output.xlsx". Do you want
to recover the contents of this workbook? If you trust the source of this
workbook, click Yes.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]