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 21571] - [NEEDS-INFO]EXCEL application error appears when closing and not saving a POI generated xls spreadsheet
Date Mon, 28 Jul 2003 13:03:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21571

[NEEDS-INFO]EXCEL application error appears when closing and not saving a POI generated xls
spreadsheet





------- Additional Comments From fred.barnes@za.tiscali.com  2003-07-28 13:03 -------
Hi Andy,

Thank you for your reply. I had a look at your font creation example versus 
mine and I can not see any differences. Please advise?

Mine:

//Create company name font.
        HSSFFont companyFont = wb.createFont();
        companyFont.setFontHeightInPoints((short) 16);
        companyFont.setFontName("Arial");
        companyFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        companyStyle = wb.createCellStyle();
        companyStyle.setFont(companyFont);

        //Create heading font.
        HSSFFont headingFont = wb.createFont();
        headingFont.setFontHeightInPoints((short) 14);
        headingFont.setFontName("Arial");
        headingFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        headingStyle = wb.createCellStyle();
        headingStyle.setFont(headingFont);

        //Create column heading font.
        HSSFFont columnHeadingFont = wb.createFont();
        columnHeadingFont.setFontHeightInPoints((short) 10);
        columnHeadingFont.setFontName("Arial");
        columnHeadingFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        columnHeadingStyle = wb.createCellStyle();
        columnHeadingStyle.setFont(columnHeadingFont);

Your example:

    // Create a new font and alter it.
    HSSFFont font = wb.createFont();
    font.setFontHeightInPoints((short)24);
    font.setFontName("Courier New");
    font.setItalic(true);
    font.setStrikeout(true);

    // Fonts are set into a style so create a new one to use.
    HSSFCellStyle style = wb.createCellStyle();
    style.setFont(font);

Kind Regards
Fred

Mime
View raw message