poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48995] New: Excel found unreadable content in workbook when using applyFont(...) on RichTextString
Date Fri, 26 Mar 2010 14:11:03 GMT
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: dev@poi.apache.org
        ReportedBy: sbrunot@gmail.com


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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message