have any brothers encounter this error ah ? How to solve it ?
part of the code :
POIFSFileSystem fs = new POIFSFileSystem(fis);
//此处报错 Unexpected missing row when some rows already present
HSSFWorkbook wb = new HSSFWorkbook(fs);
exception:
java.lang.RuntimeException: Unexpected missing row when some rows already present
at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:169)
at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:123)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:265)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:169)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:151)
------ Solution ------------------------------------- -------
are excel2003 . xls files Mody.
poi is a bug in some versions . . .
------ Solution ---------------------------------------- ----
change it pro , have 3.8 up .
now excell default is . xlsx format , and 3.1 can not read .
------ Solution ---------------------------------------- ----
exported with you may want to read inconsistent versions . excel is compatible with these and changed some things right . Exporting to see what format is the only thing . Try txt can open . Most worried about is writing csv file slightly ......
------ Solution ------------------------- -------------------
3.8 version of the 2003 and 2007 can use this , you that prior to version N
------ For reference only ---------------------------------------
are the 2003 version , just I used the online 3.7-jdk1.4 tried it , or given:
This returns :
It's contents are: Error occurred: Unexpected record type (org.apache.poi.hssf.record.DimensionsRecord)
scratching ah. . .
------ For reference only ---------------------------------- -----
this excel file is exported from another system , I have another test it
1. the file open , nothing editing, just tap Save, and then be able to read a success.
2. There is something to edit , save, and then can read successfully .
sweat ! ! ! Strange ah strange ! ! !
------ For reference only -------------------------------------- -
this problem I can not solve !
put that strange excel file opens, directly point to save , find the file bigger, from 11K into a 20K,
then use poi reading success !
originally exported the broken system is what bible format of Excel do ?
Excel2003 too strong , you can read the bible , but also add comments. poi, when you can read the bible it,
------ For reference only ---------------------------------- -----
exported file extension . xls, I use Notepad to open all garbled.
most of the old system files can be exported successfully read , except this one strange .
------ For reference only -------------------------------------- -
I used poi-3.8-final-jdk1.4-20120520-rc1.jar test that excel file , still being given:
It's contents are: Error occurred: Unexpected record type (org.apache.poi.hssf.record.DimensionsRecord)
------ For reference only ---------------------------------------
I also encountered this problem, However, save as the English name of the excel file enrolled out is so strange .
没有评论:
发表评论