Bug 45367 - when maxRowNum is 0 , HSSFSheet#removeRow() does not work
Summary: when maxRowNum is 0 , HSSFSheet#removeRow() does not work
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 07:19 UTC by rokugen
Modified: 2008-07-09 07:59 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rokugen 2008-07-09 07:19:07 UTC
when HSSFSheet has only one row, HSSFSheet#removeRow() does not work.

stack trace is...

java.lang.IllegalArgumentException: Invalid row number (-1) outside allowable range (0..65535)
	at org.apache.poi.hssf.usermodel.HSSFRow.setRowNum(HSSFRow.java:196)
	at org.apache.poi.hssf.usermodel.HSSFSheet.getRow(HSSFSheet.java:335)
	at org.apache.poi.hssf.usermodel.HSSFSheet.findLastRow(HSSFSheet.java:269)
	at org.apache.poi.hssf.usermodel.HSSFSheet.removeRow(HSSFSheet.java:243)

the version is poi-3.1-FINAL.
Comment 1 Josh Micich 2008-07-09 07:59:03 UTC
Fixed in svn r675218