Alberto1202 / zkspreadsheet

Automatically exported from code.google.com/p/zkspreadsheet
0 stars 0 forks source link

Can't insert formula "=A1" by java #296

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a event listener with following code,
    //test only
    public void onClick$test(){
        Sheet sheet = ss.getBook().getSheetAt(0);
        String expr="=A1";
        Ranges.range((Worksheet) sheet,3,3).setValue(expr);
    }

What is the expected output? What do you see instead?
Exception thrown
GRAVE: >>java.lang.IllegalArgumentException: ptgs must not be null
>> at 
org.zkoss.poi.ss.formula.FormulaRenderer.toFormulaString(FormulaRenderer.java:48
)
>> at 
org.zkoss.poi.hssf.model.HSSFFormulaParser.toFormulaString(HSSFFormulaParser.jav
a:83)
>> at org.zkoss.poi.hssf.usermodel.HSSFCell.getCellFormula(HSSFCell.java:633)
>> at org.zkoss.zss.model.impl.BookHelper.getCellValue(BookHelper.java:881)
>> at org.zkoss.zss.model.impl.BookHelper.sameTypeAndValue(BookHelper.java:1034)
>> at org.zkoss.zss.model.impl.BookHelper.setCellFormula(BookHelper.java:981)

Please use labels and text to provide additional information.
user reported in http://www.zkoss.org/forum/listComment/15422

Original issue reported on code.google.com by whkuoatt...@gmail.com on 9 Mar 2011 at 6:35

GoogleCodeExporter commented 9 years ago
Fixed since Mar. 22, 2011.

Original comment by chenhe...@gmail.com on 22 Mar 2011 at 4:32