Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-356

enable autofilter at some cells will throw a formula error message

XMLWordPrintable

      Enable autofilter at some cells will throw a formula error message such as "The specified formula 'cell!$A$16:$D$0' contains an error. Expects number, string, or defined name."
      But, if enable other cells's autofilter successfully before enabling the cell, that won't get any error and enabled autofilter normally.

      Reproducing steps:

      1. load the attached file OperationTest2007.xlsx
      2. select cell D:18 and right click to popup menu
      3. click menu Filter > Filter
        • it will show an error message and won't enable autofilter

      But enable other cell before enabling D:18 won't get error:

      1. load the attached file OperationTest2007.xlsx
      2. select cell D:4
        • enable autofilter and then disable autofilter
      3. select cell D:18 and enable autofilter
        • it enabled autofilter normally

      stack trace:

      Jun 28, 2013 11:21:37 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1359
      SEVERE: >>org.zkoss.poi.ss.formula.FormulaParseException: The specified formula 'cell!$A$16:$D$0' contains an error. Expects number, string, or defined name.
      >>	at org.zkoss.poi.ss.formula.FormulaParser.expected(FormulaParser.java:1625)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:569)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:447)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:291)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1149)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1109)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1096)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1456)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1556)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1540)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1497)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1477)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1598)
      >>	at org.zkoss.poi.ss.formula.FormulaParser.parse(FormulaParser.java:194)
      >>	at org.zkoss.poi.xssf.usermodel.XSSFName.setRefersToFormula(XSSFName.java:195)
      >>	at org.zkoss.poi.xssf.usermodel.XSSFSheet.setAutoFilter(XSSFSheet.java:3409)
      >>	at org.zkoss.zss.model.sys.impl.XRangeImpl.autoFilter(XRangeImpl.java:2070)
      >>	at org.zkoss.zss.api.impl.RangeImpl.enableAutoFilter(RangeImpl.java:552)
      >>	at org.zkoss.zss.api.SheetOperationUtil.toggleAutoFilter(SheetOperationUtil.java:45)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.doFilter(DefaultUserActionHandler.java:1168)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.dispatchAction(DefaultUserActionHandler.java:255)
      >>	at org.zkoss.zssex.ui.DefaultExUserActionHandler.dispatchAction(DefaultExUserActionHandler.java:240)
      >>	at org.zkoss.zss.ui.DefaultUserActionHandler.onEvent(DefaultUserActionHandler.java:1387)
      >>	at org.zkoss.zssex.ui.DefaultExUserActionHandler.onEvent(DefaultExUserActionHandler.java:83)
      >>	at org.zkoss.zss.ui.Spreadsheet$3.onEvent(Spreadsheet.java:343)
      >>	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2748)
      >>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2719)
      >>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2660)
      >>	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
      >>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      >>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      >>	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      >>	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      >>	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      >>	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      >>	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      >>	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      >>	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      >>	at org.mortbay.jetty.Server.handle(Server.java:326)
      >>	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      >>	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      >>	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      >>	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      >>	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      >>	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      >>	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      

        1. error.png
          31 kB
          paowang
        2. OperationTest2007.xlsx
          47 kB
          paowang
        3. success.png
          25 kB
          paowang

            hawk hawk
            paowang paowang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: