DataExporter - Exclude Columns

Particular columns can be excluded in exported document.

IdYearBrandColor
16ce194d1965AudiBrown
676400b52009JaguarWhite
1fd7c6bd1962FordBrown
1ce4e9521978VolvoGreen
8795e46d1994VolkswagenGreen
7f9e9aa01998AudiYellow
45cd44bb1995FordYellow
13927ed01965JaguarYellow
a59c7dc72009MercedesBrown
f995cf9e1965RenaultBrown
<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 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>