Ho un <p:dataTable>
:primefaces DataExporter in XLS per più colonne non funziona correttamente
<p:dataTable id="contracttblenone" var="contract" value="#{reportController.listcontract}" rowKey="#{contract.id}" paginator="true" rows="10" paginatorPosition="bottom" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" resizableColumns="true" emptyMessage="">
<p:column>
<f:facet name="header">
<h:outputText value="№"/>
</f:facet>
<h:outputText value="#{contract.id}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Firma Ad?"/>
</f:facet>
<h:outputText value="#{contract.name}"/>
</p:column>
<p:columns width="60" value="#{contract.liscolumn}" var="column">
<f:facet name="header">
<h:outputText value=" #{column.header} "/>
</f:facet>
<h:outputText value=" #{column.property} " />
</p:columns>
<f:facet name="header">
<h:outputText value="Sirket Sozlesmeler"/>
</f:facet>
</p:dataTable>
E questo è il mio commandLink:
<h:commandLink>
<p:graphicImage value="../img/xls.png" />
<p:dataExporter type="xls" target=":formreport:contracttblenone"
fileName="report" />
</h:commandLink>
Ecco come DataTable appare
Ma xls esportato è diverso ent. Si sta modificando tutti rowas come ultimo ecco lo snaphsot da Excel:
Potresti postare il metodo 'postProcessXLS'? – dratewka
@dratewka Non ha nulla. Posso rimuoverlo. Alcuni stili per le celle Excel. – user2634009
Prova ad esportare in 'type =" cvs "' e vedi come appare il file generato in un editor di testo - forse c'è un bug in Primefaces. – dratewka