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 ?)
nope looks right to me.