poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47294] New: XSSFWorkbook - FormulaParseException thrown from setRepeatingRowsAndColumns() when sheet name has a quote - ' in it.
Date Mon, 01 Jun 2009 19:39:46 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47294

           Summary: XSSFWorkbook - FormulaParseException thrown from
                    setRepeatingRowsAndColumns() when sheet name has a
                    quote - ' in it.
           Product: POI
           Version: 3.5-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: lnelson@llnl.gov


Overview:

Using poi-3.5-beta5.jar, naming a sheet with a single quote on it, and then
calling setRepeatingRowsAndColumns causes an Unparsable formula error to be
thrown.  If I use HSSFWorkbook instead, no errros are thrown.  But, I'm trying
to create xlsx files, so I must use XSSFWorkbook.

Steps to Reproduce:

try {
    Workbook wb = new XSSFWorkbook();
    wb.createSheet("Testing's sheet");
    wb.setRepeatingRowsAndColumns(0, 0, 0, 0, 3);
} catch (Exception e) {
    e.printStackTrace();
}

Actual Results:

java.lang.IllegalArgumentException: Unparsable formula ''Testing's
sheet'!$A:$A,'Testing's sheet'!$1:$4'
    at
org.apache.poi.xssf.usermodel.XSSFName.setRefersToFormula(XSSFName.java:205)
    at
org.apache.poi.xssf.usermodel.XSSFWorkbook.setRepeatingRowsAndColumns(XSSFWorkbook.java:941)
    at gov.llnl.ais.reporting.engine.adhoc.TestExcel.main(TestExcel.java:13)
Caused by: org.apache.poi.ss.formula.FormulaParser$FormulaParseException:
Specified named range 'Testing' does not exist in the current workbook.
    at
org.apache.poi.ss.formula.FormulaParser.parseNameOrCellRef(FormulaParser.java:440)
    at
org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:336)
    at
org.apache.poi.ss.formula.FormulaParser.parseFunctionReferenceOrName(FormulaParser.java:332)
    at
org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:733)
    at
org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:693)
    at
org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:680)
    at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:982)
    at
org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1083)
    at
org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1067)
    at
org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1024)
    at
org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1003)
    at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1125)
    at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:192)
    at
org.apache.poi.xssf.usermodel.XSSFName.setRefersToFormula(XSSFName.java:202)
    ... 2 more

Expected Results:

Should work, like it does with HSSFWorkbook

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


Mime
View raw message