`
potaly
  • 浏览: 1609 次
  • 性别: Icon_minigender_1
最近访客 更多访客>>
社区版块
存档分类
最新评论

JXL 取的空值报 ArrayIndexOutOfBoundsException 解决方法

    博客分类:
  • JAVA
阅读更多
			

for(int j=2;j< 30;j++){
	 
 paramMap.put("ATTRIBUTE"+(j-1), sheet.getCell(i).getContents().trim());
					
			}


上述代码 sheet.getCell(i).getContents() 当单元格为空时,报ArrayIndexOutOfBoundsException



解决方案:sheet.getCell(i).getContents() 替换为

sheet.getCell(j,i).getContents()


j代表列 i代表行
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics