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 2005/03/15 19:01:03 UTC

DO NOT REPLY [Bug 34021] New: - FormulaParser doesn't like dots and blanks in sheet names

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34021>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34021

           Summary: FormulaParser doesn't like dots and blanks in sheet
                    names
           Product: POI
           Version: 2.5
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: thomas.herre@abosco.com


I'm trying to set a cell formula using method HSSFCell.setCellFormula(String).

The FormulaParser fails parsing these formulas:
cell.setCellFormula("Test.Sheet!A1");
cell.setCellFormula("Sheet 1!A1");

When I remove all blanks and dots from the referenced sheet name everything
works fine.

Here's the stack trace:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:444)
	at org.apache.poi.hssf.util.CellReference.<init>(CellReference.java:44)
	at org.apache.poi.hssf.record.formula.ReferencePtg.<init>(ReferencePtg.java:50)
	at org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:291)
	at org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:474)
	at org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:548)
	at org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:596)
	at org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java:700)
	at org.apache.poi.hssf.usermodel.HSSFCell.setCellFormula(HSSFCell.java:678)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/