https://issues.apache.org/bugzilla/show_bug.cgi?id=48995
Summary: Excel found unreadable content in workbook when using
applyFont(...) on RichTextString
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: XSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
When executing the following piece of code:
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sh = wb.createSheet("test");
XSSFRow row = sh.createRow(0);
XSSFCell cell = row.createCell(0, XSSFCell.CELL_TYPE_STRING);
RichTextString data = new XSSFRichTextString("bold not bold");
short fontHeight = 12;
XSSFFont boldFont = wb.createFont();
boldFont.setFontName("Arial");
boldFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
boldFont.setColor(Font.COLOR_NORMAL);
boldFont.setFontHeight(fontHeight);
data.applyFont(0, 4, boldFont);
cell.setCellValue(data);
wb.write(new FileOutputStream("out.xlsx"));
and then opening the out.xlsx file in Microsoft Excel 2007, an error message is
displayed: "Excel found unreadable content in 'out.xlsx'. Do you want to
recover the contents of this workbook ? If you trust the source of this
workbook, click Yes."
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]