You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/06/01 23:50:20 UTC

[Bug 55747] nested function in IF's in formulas produce #VALUE! error in excel

https://bz.apache.org/bugzilla/show_bug.cgi?id=55747

--- Comment #1 from Dominik Stadler <do...@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