the01
the01
采纳率100%
2017-11-21 14:47

poi刷新excel公式的问题

20
已采纳

Exception in thread "main" org.apache.poi.ss.formula.FormulaParseException: Parse error near char 0 '★' in specified formula '★★Sheet1!B54'. Expected cell ref or constant literal
at org.apache.poi.ss.formula.FormulaParser.expected(FormulaParser.java:269)
at org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1545)
at org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1498)
at org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1485)
at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1858)
at org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1986)
at org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1970)
at org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1927)
at org.apache.poi.ss.formula.FormulaParser.intersectionExpression(FormulaParser.java:1900)
at org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1880)
at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:2028)
at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:170)
at org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook.getFormulaTokens(XSSFEvaluationWorkbook.java:85)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:276)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:220)
at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCellValue(BaseXSSFFormulaEvaluator.java:64)
at org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateFormulaCellEnum(BaseFormulaEvaluator.java:192)
at readExcel.CopyExcelTbl.refreshFormula(CopyExcelTbl.java:120)
at readExcel.CopyExcelTbl.copyTblByCoordinate(CopyExcelTbl.java:74)
at readExcel.CopyExcelTbl.main(CopyExcelTbl.java:183)
想要一个单元格的公式,公式是取另一个sheet的单元格值,
另一个sheet名字中有特殊字符“★”,
报错信息如上,求解决之道

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • the01 the01 4年前

    补充:想要刷新一个单元格的公式

    点赞 评论 复制链接分享

相关推荐