The thing is simple, I want to export a table of primefaces to .xlsx however at the moment of pressing the button that should do it, I get the following exception:
java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.RichTextString
It's as if it will not detect apache poi, however I do have it installed.
This is the image of my view:
The code of my view:
<h:form prependId="false" id="listadoUsuarios">
<div class="row">
<div class="col s2">
<h:commandLink class="btn">
Exportaaaaar
<p:dataExporter type="xls" target="listadoUsuarios" fileName="ok" pageOnly="true"/>
</h:commandLink>
</div>
</div>
<div class="row">
<div class="col s12">
<p:dataTable value="#{userController.allUsers}" var="u">
<p:column headerText="Nombre" filterMatchMode="contains" filterBy="#{u.name}" sortBy="#{u.name}">
<h:outputText value="#{u.name}"/>
</p:column>
<p:column headerText="Email" filterMatchMode="contains" filterBy="#{u.email}" sortBy="#{u.email}">
<h:outputText value="#{u.email}"/>
</p:column>
<p:column headerText="Teléfono" filterMatchMode="contains" filterBy="#{u.phone}" sortBy="#{u.phone}">
<h:outputText value="#{u.phone}"/>
</p:column>
</p:dataTable>
</div>
</div>
</h:form>
The code of my pom.xml on the web where I have apache-poi:
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.2-FINAL</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
</dependency>
I hope you can help me achieve it: /