Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Export of List Grid giving error

    Hi,

    I am trying to export a grid and it exports an empty file with just have the headers.

    Attaching the snapshot of the grid I'm trying to export.

    I get the below error on the console.

    `java.lang.IllegalArgumentException: Invalid column index (-1). Allowable column range for EXCEL2007 is (0..16383) or ('A'..'XFD') at org.apache.poi.xssf.streaming.SXSSFRow.checkBounds(SXSSFRow.java:169) at org.apache.poi.xssf.streaming.SXSSFRow.createCell(SXSSFRow.java:156) at org.apache.poi.xssf.streaming.SXSSFRow.createCell(SXSSFRow.java:140) at org.apache.poi.xssf.streaming.SXSSFRow.createCell(SXSSFRow.java:37) at com.isomorphic.rpc.ExcelDataExport.outputHeaderSpans(ExcelDataExport.java:1420) at com.isomorphic.rpc.ExcelDataExport.outputHeaders(ExcelDataExport.java:1098) at com.isomorphic.rpc.ExcelDataExport.getExportObject(ExcelDataExport.java:487) at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:654) at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:453) at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1327) at com.isomorphic.rpc.RPCManager.send(RPCManager.java:760) at com.isomorphic.rpc.RPCManager.processRPCTransaction(RPCManager.java:2921) at com.assaabloy.common.server.services.impl.SpringSmartGWTServiceImpl.processQueue(SpringSmartGWTServiceImpl.java:20) at com.assaabloy.common.server.services.impl.SpringSmartGWTServiceImpl$$FastClassBySpringCGLIB$$e4c0cd01.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:737) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) at com.assaabloy.common.server.services.impl.SpringSmartGWTServiceImpl$$EnhancerBySpringCGLIB$$6a9e5af7.processQueue(<generated>) at com.assaabloy.common.server.servlet.IDACallWithErrorsAndTransactions.processRPCTransaction(IDACallWithErrorsAndTransactions.java:52) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:148) at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:263) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:91) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:748)`

    There are only 20 columns on the UI, but still, this gives an error. This used to work perfectly in the previous version.

    If I remove 5 columns from the grid, namely: "Used, Modifiers, UOM, Attachment, Cost+Modifiers, Attachment(one with pin icon)" this works fine.

    SmartgwtVersion: 12.1-p20201118



    Attached Files

    #2
    any update on this?

    Comment


      #3
      Sorry for the delay: no, we have not imposed a new 20 column limit (obviously), in fact, nothing relevant has changed in the export code in a long time, no other users are reporting a similar problem, and much larger exports are working fine, as you can also readily determine by adding more columns to Showcase examples.

      Our only guess is that one of your field definitions is invalid and has always been invalid (for example: perhaps field.name is not a valid JavaScript identifier, or field.title has garbage high-ascii characters) and this is the first time you've noticed the problem.

      We will need a way to reproduce the problem if you want us to look further.

      Comment


        #4
        This error came due to Header Spans in the grid. Remove custom fields from header span that are not in Datasource. and use
        Code:
        setExportFields(exportedFieldsArray)
        ; property

        Comment


          #5
          Thanks for finding the source of the problem. Now we are working on a fix to address it.

          Regards
          Isomorphic Software

          Comment


            #6
            Are you calling exportData()? If you want fields which are not in the DS to appear in the export, you need to use exportClientData() instead, and that seems to work as expected in our testing.

            If you're already calling exportClientData() and still see this problem, please show test-code we can run to see the issue.

            In the meantime, we'll look into handling this situation better.

            Comment


              #7
              Note that we've made a framework change to deal with this - client-only fields (not in the DataSource) will now be ignored by exportData(), along with client-side formatting - we've updated the doc to cover this.

              If you want client-only fields to be included, use exportClientData() instead of exportData().

              You can test the changes in builds of 12.0 and higher, dated February 21 and later.

              Comment

              Working...
              X