https://bz.apache.org/bugzilla/show_bug.cgi?id=65669

            Bug ID: 65669
           Summary: Cannot find column with quote
           Product: POI
           Version: 5.0.x-dev
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

In a XSSFTable, if a header contains a quote an is used in an expression, it
cannot be found when the expression is parsed. A FormulaParseException is
thrown, notwithstanding the quote is escaped or not.


Exception in thread "main" org.apache.poi.ss.formula.FormulaParseException: One
of the columns Coût fourniture d''électricité (€/mois), Taxes locales (€/mois)
doesn't exist in table Table1
        at
org.apache.poi.ss.formula.FormulaParser.parseStructuredReference(FormulaParser.java:805)



In XSSFTable.findColumnIndex(String), in the second to last line, the
replacement should be:

        Integer idx = columnMap.get(caseInsensitive(columnHeader.replace("''",
"'")));
instead of
        Integer idx = columnMap.get(caseInsensitive(columnHeader.replace("'",
"")));

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to