I am using Primefaces p:dataExporter in order to export the data from the p:dataTable in a CSV file. I want to have a different header name for one of the table columns in my exported file. How can I do that since the preProcessor and postProcessor methods are used just for XLS and PDF? Should I create my own exporter?
1
votes
1 Answers
1
votes
You have two choices...
If you are using PrimeFaces 6.0.31, 6.1.17 or 6.2.4 or higher you can use the new "exportHeader" attribute on the column.
<p:column headerText="Test" exportHeader="My Exported Column Name">
If you are not using one of those versions of PF or higher than you can create your own customized exporter.