poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54743] New: getrow() returns null even though there's data in the file.
Date Fri, 22 Mar 2013 17:29:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54743

            Bug ID: 54743
           Summary: getrow() returns null even though there's data in the
                    file.
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: dajasin@gmail.com
    Classification: Unclassified

Here's the code:

SXSSFWorkbook wb;
Sheet sheet;
Row r;
Cell cell;
InputStream inp;

try {

inp = new FileInputStream(sFileName);

            wb = new SXSSFWorkbook(new XSSFWorkbook(inp));

            cell = wb.getSheetAt(0).getRow(0).getCell(0);

            if(cell != null) {
                sOutput = cell.getStringCellValue();
                sOutput = sOutput + " in here!";
            } else {
                sOutput = "Nothing";
            }

            System.out.println(sOutput);

            inp.close();

        }
        catch(FileNotFoundException ex) {
            System.out.println(ex.getMessage());
        }
        catch(IOException | NullPointerException ex) {
            System.out.println(ex.getMessage());
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message