POI读取Excel数据时出现异常
利用POI读取Excel数据,存入一数组中。出现如下异常:
java.lang.reflect.InvocationTargetException
Caused by:
java.lang.IllegalArgumentException: Cannot store a duplicate value ("1~3") in this Map
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null
读取某些格式表格时才出现。有谁知道怎么处理吗?
谢谢~~~
----------------解决方案--------------------------------------------------------
第一个是调用目标异常
第二个是非法参数异常
第三个是记录格式异常
你根据异常的提示应该可以找得出错误的
并且应该学会自己去排除错误.因为错误信息编译器或者JVM一般都会告诉你的
----------------解决方案--------------------------------------------------------
在读取一般格式表格时,都不会有异常出现。只有在读复杂格式表单时才出现。
谢谢千里冰封。
----------------解决方案--------------------------------------------------------