ICEfaces
  1. ICEfaces
  2. ICE-11235

ace:dataExporter - Add support for .xlsx format exports

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • 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

        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.
        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.
        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
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: