Java apache poi setting the cell formula
- by Ray
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?