問題が解決しました。
問題は私がエクスポートしていた方法にありました.私はもともとjasperReportsにセルタイプを検出しないように指示していました.
したがって、修正はに設定JRXlsExporterParameter.IS_DETECT_CELL_TYPE
することでしたTRUE
。
例えば
JRXlsExporter exporterxls2 = new JRXlsExporter();
exporterxls2.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporterxls2.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.FALSE);
exporterxls2.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrints);
exporterxls2.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, reportFile.getPath());
外部ファイルを使用してエクスポートを構成している人もいると思います。その場合、含める行は次のとおりです。
net.sf.jasperreports.export.xls.detect.cell.type=true
それが役に立てば幸い :)