java讀入delphi生成的excel報錯
最近遇到一個問題用delphi生成一個excel檔案,用java讀取excel內容,通過java的POI讀入時報錯如下: java.lang.RuntimeExceptception: Unexpected record type (e (org.apache.poi.hssf.record.DimensionsRecsRecord) at at org.apache.poi.hssf.record.aggregates.RowRecordsAggsAggregate.(t>(RowRecordsAggregate.java:97) a) at at org.apache.poi.hssf.model.InternalSheetheet.(t>(InternalSheet.java:172) a) at at org.apache.poi.hssf.model.InternalSheet.createSheet(Iet(et(InternalSheet.java:127) a) at at org.apache.poi.hssf.usermodel.HSSFWorkbook.ook.(t>(HSSFWorkbook.java:291) a) at at org.apache.poi.hssf.usermodel.HSSFWorkbook.ook.(t>(HSSFWorkbook.java:243) a) at at org.apache.poi.hssf.usermodel.HSSFWorkbook.ook.(t>(HSSFWorkbook.java:187) a) at at org.apache.poi.hssf.usermodel.HSSFWorkbook.ook.(t>(HSSFWorkbook.java:322) a) at at org.apache.poi.hssf.usermodel.HSSFWorkbook.ook.(t>(HSSFWorkbook.java:303) a) at at com.chinagas.common.utils.ExcelUtils.xls_rea_reader_settle(le(ExcelUtils.java:325) a) at at com.chinagas.common.utils.ExcelUtils.main(Exc(in(ExcelUtils.java:377) 幾經周折,試了各種方式都不行,最後認為應該是不同語言不謙容,準備換語言解決。 最後找到問題解決辦法: 用XLSReadWriteII4替換XLSReadWriteII2解決了,估計應該是XLSReadWriteII2版本太低了。 總之終於是解決了此問題。