Java apache poi setting the cell formula

Posted by Ray on Stack Overflow See other posts from Stack Overflow or by Ray
Published on 2010-03-25T20:08:56Z Indexed on 2010/03/25 20:13 UTC
Read the original article Hit count: 585

Filed under:
|
|
|

I am try to set a cell formulat that references cells from other workbooks. However, when I open the programmatically generated workbook, the formula cells show up as #REF!. I print out the formulas that were generated in a log. If I cut and paste those into the cells, the numbers from the external workbooks is pulled in.

        String formula = "'C:\\tmp\\ForecastAggregate\\Total Products\\[ForecastWorksheet.xls]2010 Budget'!C10"; 
        HSSFCell cell = row.createCell(0); //row was created above
        cell.setCellFormula(formula);

Can anybode help?

© Stack Overflow or respective owner

Related posts about java

Related posts about apache