poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38796] New: - NullPointerException at org.apache.poi.hssf.usermodel.HSSFSheet.isRowBroken(HSSFSheet.java:1129)
Date Mon, 27 Feb 2006 17:09:23 GMT
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: sudha_rv@yahoo.com


//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: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message