DataExporter - Exclude Columns

Particular columns can be excluded in exported document.

Documentation
IdYearBrandColor
ee6278981973FordBlue
28c81c2d1960JaguarWhite
1131213f1975MercedesBlack
e8cc847d1984FordWhite
a820c2fe1983FiatWhite
856c81e71973JaguarBlack
89b686621968JaguarGreen
1215491f2001MercedesOrange
09c81c6a1979AudiGreen
a92a7efb1999HondaWhite
<h:form>
    <p:dataTable id="tbl" var="car" value="#{dataExporterView.cars}" 
                 paginator="true" rows="10">
        <p:column>
            <f:facet name="header">
                <h:outputText value="Id" />
            </f:facet>
            <h:outputText value="#{car.id}" />
        </p:column>

        <p:column exportable="false">
            <f:facet name="header">
                <h:outputText value="Year" />
            </f:facet>
            <h:outputText value="#{car.year}" />
        </p:column>

        <p:column>
            <f:facet name="header">
                <h:outputText value="Brand" />
            </f:facet>
            <h:outputText value="#{car.brand}" />
        </p:column>

        <p:column exportable="false">
            <f:facet name="header">
                <h:outputText value="Color" />
            </f:facet>
            <h:outputText value="#{car.color}" />
        </p:column>
    </p:dataTable>

    <h:commandLink id="excel">
        <p:graphicImage name="/demo/images/excel.png" />
        <p:dataExporter type="xls" target="tbl" fileName="cars" />
    </h:commandLink>

    <h:commandLink>
        <p:graphicImage name="/demo/images/xlsx.png" width="24"/>
        <p:dataExporter type="xlsxstream" target="tbl" fileName="cars" />
    </h:commandLink>

    <h:commandLink id="pdf">
        <p:graphicImage name="/demo/images/pdf.png" />
        <p:dataExporter type="pdf" target="tbl" fileName="cars" />
    </h:commandLink>

    <h:commandLink id="csv">
        <p:graphicImage name="/demo/images/csv.png" />
        <p:dataExporter type="csv" target="tbl" fileName="cars" />
    </h:commandLink>

    <h:commandLink id="xml">
        <p:graphicImage name="/demo/images/xml.png" />
        <p:dataExporter type="xml" target="tbl" fileName="cars" />
    </h:commandLink>
</h:form>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.