Search code examples
primefaces

DataExporter doesn't export DataTable column headerText


I try to export datatable datas to excel file by dataexporter. DataExporter export datatable column headerTexts when i use primefaces 6.1. But I upgraded to version 12.0.0, dataexporter doesn't export datatable column headerTexts. I use all export header types. But both of them doens'nt work. I checked primefaces showcase page. It doesn't work at primefaces showcase page. I see "null" when i call getRow(0). Rows start at index 1. But I see first row is empty when i check exported excel file. How can i export headerTexts?

<p:column headerText="test" style="width:170px;"
        filterBy="#{variable}" filterMatchMode="contains">
    <h:outputText value="test" />
</p:column>


<p:column style="width:170px;"
        filterBy="#{variable}" filterMatchMode="contains">
        <f:facet name="header">
            <h:outputText value="test" />
        </f:facet>
        
        <h:outputText value="test" />
</p:column>

Solution

  • Issue: https://github.com/primefaces/primefaces/issues/9290

    PR: https://github.com/primefaces/primefaces/pull/9291

    Fixed in PF Elite 12.0.1 and Community 13.0.0