poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55747] nested function in IF's in formulas produce #VALUE! error in excel
Date Mon, 01 Jun 2015 21:50:20 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=55747

--- Comment #1 from Dominik Stadler <dominik.stadler@gmx.at> ---
Java version of test:

    public void test55747() throws IOException {
        HSSFWorkbook wb = new HSSFWorkbook();

        Sheet sheet =wb.createSheet("Test1");
        Row row =sheet.createRow(0);
        CellUtil.createCell(row, 0, "Hello world.");
        row = sheet.createRow(1);
        Cell cell = row.createCell(0);
        cell.setCellType(Cell.CELL_TYPE_FORMULA);
        String refCell = "A1";
        String formula = refCell;
        formula = "IF(isblank(" + refCell + "),\" not blank a1\",CONCATENATE("
+ refCell + ", \" - %s.\"))";

        cell.setCellFormula(formula);
        wb.setForceFormulaRecalculation(true);
        wb.write(new FileOutputStream("C:\\temp\\55747.xls"));

        wb.close();
    }

-- 
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