无法在p:dataExporter中自动调整列大小

时间:2018-08-22 14:53:57

标签: jsf primefaces apache-poi

我正在尝试使用PrimeFaces DataExporter导出xlsxstream类型的文件,但似乎出现此错误:

WARNING: Could not auto-size column. Make sure the column was tracked prior to auto-sizing the column.
java.lang.IllegalStateException: Could not auto-size column. Make sure the column was tracked prior to auto-sizing the column.
    at org.apache.poi.xssf.streaming.SXSSFSheet.autoSizeColumn(SXSSFSheet.java:1606)
    at org.apache.poi.xssf.streaming.SXSSFSheet.autoSizeColumn(SXSSFSheet.java:1560)
    at org.primefaces.component.export.ExcelExporter.export(ExcelExporter.java:85)
    at org.primefaces.component.export.DataExporter.processAction(DataExporter.java:145)
    at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
    ...

有任何想法如何调试它,或者可能是什么原因?

1 个答案:

答案 0 :(得分:2)

相关问题