如何使用p:dataExporter以正确的类型导出数字?

时间:2015-08-27 07:32:47

标签: primefaces datatable pf-datatable

我使用PrimeFaces dataExporter将我的数据表导出到Excel文件。问题是数字是作为文本导出的。

如何将我的数字导出为整数和双精度?

    <p:column headerText="net_usd_sale">
        <h:outputText value="#{dizgi.net_usd_sale}" />
    </p:column>

    <p:column style="text-align: center" exportable="false">
   <f:facet name="header">
     <h:outputText value="Details" />
   </f:facet>
   <h:graphicImage value="/resources/images/details.png"  alt="details image" />

    </p:column>

</p:dataTable>
<h3>Export Page Data Only</h3>
    <h:commandLink>
        <p:graphicImage library="images" name="excel.png" width="24" />
        <p:dataExporter type="xls" target="tbl" fileName="dizgi" pageOnly="true"/>
    </h:commandLink>

    </h:form>

</html>   

0 个答案:

没有答案
相关问题