ICEfaces
  1. ICEfaces
  2. ICE-11235

ace:dataExporter - Add support for .xlsx format exports

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4.x

      Description

      The POI library that the ace:dataExporter uses to export to .xls format currently seems to now also support the newer .xlsx format.

      This JIRA is to enable exported to the .xlsx format using ace:dataExporter (in addition to the existing .xls format).

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Fix Version/s EE-4.2.0.GA [ 13071 ]
        Affects Documentation (User Guide, Ref. Guide, etc.),Sample App./Tutorial [ 10003, 10001 ]
        Assignee Priority P2 [ 10011 ]
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ] P1 [ 10010 ]
        Hide
        Arturo Zambrano added a comment -

        r51310: ace:dataExporter, added support for exporting data in the xlsx format

        Supporting the xlsx format required updating the current poi library and adding other dependency libraries.

        The core poi library doesn't support the xlsx format out of the box. It is necessary to also add the poi-ooxml library to support it, which in turn requires the poi-ooxml-schemas library and the dom4j library. This adds about 6 MB in libraries.

        I tried using the previous poi 3.7 version, but the available dependencies mentioned above weren't compatible with it, so the core poi library had to be updated as well to the 3.9 version.

        At the moment, the common.xml build file for the sample applications is not including these new libraries, since it would greatly increase the sizes of the sample applications. This is pending until we decide if we want to showcase the support for the xlsx format or if we simply want to document it in the wiki for those interested in it.

        Show
        Arturo Zambrano added a comment - r51310: ace:dataExporter, added support for exporting data in the xlsx format Supporting the xlsx format required updating the current poi library and adding other dependency libraries. The core poi library doesn't support the xlsx format out of the box. It is necessary to also add the poi-ooxml library to support it, which in turn requires the poi-ooxml-schemas library and the dom4j library. This adds about 6 MB in libraries. I tried using the previous poi 3.7 version, but the available dependencies mentioned above weren't compatible with it, so the core poi library had to be updated as well to the 3.9 version. At the moment, the common.xml build file for the sample applications is not including these new libraries, since it would greatly increase the sizes of the sample applications. This is pending until we decide if we want to showcase the support for the xlsx format or if we simply want to document it in the wiki for those interested in it.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51310 Mon Mar 13 13:08:40 MDT 2017 art.zambrano ICE-11235 ace:dataExporter, added support for exporting data in the xlsx format
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/DataExporterMeta.java
        Commit graph ADD /icefaces4/trunk/icefaces/lib/ace/poi-ooxml-schemas-3.9.jar
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/ExcelExporter.java
        Commit graph ADD /icefaces4/trunk/icefaces/lib/ace/poi-3.9.jar
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/ExporterFactory.java
        Commit graph ADD /icefaces4/trunk/icefaces/lib/ace/poi-ooxml-3.9.jar
        Commit graph DEL /icefaces4/trunk/icefaces/lib/ace/poi-3.7.jar
        Commit graph ADD /icefaces4/trunk/icefaces/lib/ace/dom4j-1.6.1.jar
        Hide
        Arturo Zambrano added a comment -

        r51330: updated common.xml build file for samples to include the new version (3.9) of the poi library

        Most likely that error was due to no poi library being included when building the app. This commit fixes that issue by including the new version of the library. Other build files in QA repositories may need to be updated as well to include this new version. Search for the string "poi-3.7.jar" and replace for "poi-3.9.jar" (i.e. the seven becomes nine). The other libraries to support XLSX still need to be added manually.

        Show
        Arturo Zambrano added a comment - r51330: updated common.xml build file for samples to include the new version (3.9) of the poi library Most likely that error was due to no poi library being included when building the app. This commit fixes that issue by including the new version of the library. Other build files in QA repositories may need to be updated as well to include this new version. Search for the string "poi-3.7.jar" and replace for "poi-3.9.jar" (i.e. the seven becomes nine). The other libraries to support XLSX still need to be added manually.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51330 Tue Mar 14 16:50:11 MDT 2017 art.zambrano ICE-11235 updated common.xml build file for samples to include the new version (3.9) of the poi library
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/build/common.xml
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Arturo Zambrano made changes -
        Affects Documentation (User Guide, Ref. Guide, etc.),Sample App./Tutorial [ 10003, 10001 ] Documentation (User Guide, Ref. Guide, etc.),Sample App./Tutorial,Compatibility/Configuration [ 10003, 10001, 10002 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51356 Fri Mar 17 15:03:39 MDT 2017 ken.fyten ICE-11235 - Added new poi libs to versions-licenses.html and NOTICE.txt.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/licenses/NOTICE.txt
        Commit graph MODIFY /icefaces4/trunk/icefaces/lib/versions-licenses.html
        Hide
        Ken Fyten added a comment -

        Need to add a "xlsx" export to the showcase demo to illustrate this.

        Show
        Ken Fyten added a comment - Need to add a "xlsx" export to the showcase demo to illustrate this.
        Hide
        Arturo Zambrano added a comment -

        I did various tests with various combinations of the poi library versions 3.7 and 3.9 and its dependencies, and this is what I found out.

        • The poi 3.9 version will also require the Apache commons codec library in order to perform the custom operations in the preprocessor and postprocessor methods, for both formats XLS and XLSX. This library is 72 KB in size. The poi 3.7 version doesn't require this library for those operations.
        • Supporting the XLSX format will require one additional library, the Apache XMLBeans library. This is required with either version of poi, 3.7 or 3.9. I had read about this library being a dependency for XLSX, but in the tests I made in the showcase it wasn't necessary for some reason, so I didn't include it at first. I found the other dependencies (ooxml and ooxml-schemas) that are compatible with poi 3.7, but they still need this XMLBeans library as well. The size of this library is about 2.5 MB.

        There's the option of maybe staying with the old 3.7 version of poi, now that compatible dependencies have been found, but the only benefit would be to avoid the Apache commons codec library, which is very small.

        So, we will include these two additional libraries and update the documentation regarding those libraries.

        Show
        Arturo Zambrano added a comment - I did various tests with various combinations of the poi library versions 3.7 and 3.9 and its dependencies, and this is what I found out. The poi 3.9 version will also require the Apache commons codec library in order to perform the custom operations in the preprocessor and postprocessor methods, for both formats XLS and XLSX. This library is 72 KB in size. The poi 3.7 version doesn't require this library for those operations. Supporting the XLSX format will require one additional library, the Apache XMLBeans library. This is required with either version of poi, 3.7 or 3.9. I had read about this library being a dependency for XLSX, but in the tests I made in the showcase it wasn't necessary for some reason, so I didn't include it at first. I found the other dependencies (ooxml and ooxml-schemas) that are compatible with poi 3.7, but they still need this XMLBeans library as well. The size of this library is about 2.5 MB. There's the option of maybe staying with the old 3.7 version of poi, now that compatible dependencies have been found, but the only benefit would be to avoid the Apache commons codec library, which is very small. So, we will include these two additional libraries and update the documentation regarding those libraries.
        Hide
        Arturo Zambrano added a comment -

        r51365: added Apache commons codec and Apache XMLBean libraries to support XLSX exporting (4.2 trunk)
        r46717: added Apache commons codec and Apache XMLBean libraries to support XLSX exporting (QA DataExporter app)

        Show
        Arturo Zambrano added a comment - r51365: added Apache commons codec and Apache XMLBean libraries to support XLSX exporting (4.2 trunk) r46717: added Apache commons codec and Apache XMLBean libraries to support XLSX exporting (QA DataExporter app)
        Hide
        Arturo Zambrano added a comment -

        r51366: added option to export in XLSX format in the showcase ace:dataExporter demos; modified showcaase build file to include required libraries for exporting XLSX

        Show
        Arturo Zambrano added a comment - r51366: added option to export in XLSX format in the showcase ace:dataExporter demos; modified showcaase build file to include required libraries for exporting XLSX
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51366 Tue Mar 21 13:01:59 MDT 2017 art.zambrano ICE-11235 added option to export in XLSX format in the showcase ace:dataExporter demos; modified showcaase build file to include required libraries for exporting XLSX
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataExporter/dataExporterExcludeFromExport.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataExporter/dataExporterRows.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataExporter/dataExporter.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataExporter/dataExporterColumns.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/build.xml
        Hide
        Arturo Zambrano added a comment -

        Updated wiki page with information about the new libraries.

        Show
        Arturo Zambrano added a comment - Updated wiki page with information about the new libraries.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: