将p:datatable导出到PrimeFaces中的excel
我想将数据表导出到excel。 我无法在excel中显示数据表的标题将p:datatable导出到PrimeFaces中的excel,primefaces,datatable,export-to-csv,Primefaces,Datatable,Export To Csv,我想将数据表导出到excel。 我无法在excel中显示数据表的标题 <p:commandLink ajax="false"> <h:outputLabel value="Excel"/> <p:dataExporter type="xls" target="idColPlanCompteM61Export" fileName="PlanCompteM61" postProcessor="#{p
<p:commandLink ajax="false">
<h:outputLabel value="Excel"/>
<p:dataExporter type="xls"
target="idColPlanCompteM61Export"
fileName="PlanCompteM61"
postProcessor="#{planCompteM61ManagerBean.postProcessXLS}"/>
</p:commandLink>
<p:dataTable id="idColPlanCompteM61Export" var="ligne" value="#{planCompteM61ManagerBean.listeColPlanCompteM61Filtree}">
<f:facet name="header">
<div class="printTitrePosition">
<h:outputText value="Plan de compte M61"/>
</div>
</f:facet>
...
...
...
...
没有显示标题看看这个使用前置和后置处理器的DataExporter示例
您需要一个后处理器,并且可以操作工作表并在中添加标题。将其作为后处理器并在第0行“插入”一行,这样POI将向下撞击所有行并在第0行中插入新的标题行。它可能尚未实现。您使用了
。
?是的,我使用:。。。