Bug 16092 - HSSFRow.getLastCellNum 's problem
Summary: HSSFRow.getLastCellNum 's problem
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-15 05:30 UTC by FaQiang Ye
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FaQiang Ye 2003-01-15 05:30:33 UTC
Hi. 
    I'm using jakarta-poi-1.9.0-dev-20030114 and find a problem.
Is HSSFRow.getLastCellNum() the row's number of cells ?
If I read a new xls file, the result is right, but If I write
xls data like this, it get the number of cells - 1. 


//////////////////////////////////

		public setVal(row,col,val) {
			HSSFRow wRow = workSheet.getRow(row);
			HSSFCell wCell = wRow.createCell((short)col);
	
	        wCell.setCellType( HSSFCell.CELL_TYPE_STRING );
			wCell.setCellValue(value);
		}
		
		public excute() {
			setVal(0,0,"1");
			setVal(0,1,"2");
			setVal(0,2,"3");
			HSSFRow wRow = workSheet.getRow(0);
			System.out.println("LastNum is " + wRow.getLastCellNum
());
			...	
		}
		
		
		result:		LastNum is 2		(correct result is 3 ?)
Comment 1 Andy Oliver 2003-07-24 14:11:24 UTC
nope looks right to me.