Quarkus POI

This extension enables you to use Apache POI in your Quarkus application.

Apache POI is a Java API for Microsoft Documents. It allows Java programs to read and write files in Microsoft Office formats, such as Word, Excel and PowerPoint. It also allows programs to create new files in these formats. It is an open source project and is available under the Apache License.

Installation

If you want to use this extension, you need to add the io.quarkiverse.poi:quarkus-poi extension first to your build file.

For instance, with Maven, add the following dependency to your POM file:

<dependency>
    <groupId>io.quarkiverse.poi</groupId>
    <artifactId>quarkus-poi</artifactId>
    <version>2.0.5</version>
</dependency>

Docker

When building native images in Docker using the standard Quarkus Docker configuration files some additional features need to be installed to support Apache POI. Specifically font information is not included in Red Hat’s ubi-minimal images. To install it simply add these lines to your DockerFile.native file:

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7

######################### Set up environment for POI ##########################
RUN microdnf update && microdnf install freetype fontconfig && microdnf clean all
######################### Set up environment for POI ##########################

WORKDIR /work/
RUN chown 1001 /work \
    && chmod "g+rwX" /work \
    && chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]