DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38796>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38796 Summary: NullPointerException at org.apache.poi.hssf.usermodel.HSSFSheet.isRowBroken(HSSF Sheet.java:1129) Product: POI Version: 2.5 Platform: PC OS/Version: other Status: NEW Severity: normal Priority: P2 Component: HSSF AssignedTo: poi-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] //Read an excel spreadsheet POIFSFileSystem fileSystem = new POIFSFileSystem(new FileInputStream("c:/temp/test.xls")); HSSFWorkbook workbook = new HSSFWorkbook(fileSystem); HSSFSheet worksheet = workbook.createSheet("ABC"); //Create a header row for (int i = 1; i <= 50; i++) { HSSFRow row = worksheet.createRow((short) i); for (int j = 0; j < 10; j++) { HSSFCell cell = row.createCell((short) j); } if (worksheet.isRowBroken(i)) { //Create a header row in new page; } } //Error details Line # 20 in the above code throws the following exception java.lang.NullPointerException at org.apache.poi.hssf.record.PageBreakRecord.getBreak(PageBreakRecord.java:251) at org.apache.poi.hssf.model.Sheet.isRowBroken(Sheet.java:2644) at org.apache.poi.hssf.usermodel.HSSFSheet.isRowBroken(HSSFSheet.java:1129) at .... -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/