尝试使用webdriver从excel中的单元格读取时获取空指针异常

时间:2015-03-09 19:58:20

标签: java excel apache-poi

XSSFWorkbook wb = new XSSFWorkbook(fis);
XSSFSheet sheet =wb.getSheet("TestData");
           Row row = sheet.getRow(1);
           Cell cell = row.getCell(1);
           String x = "";
     x =cell.getStringCellValue();
     System.out.println(x);

我在Row row = sheet.getRow(1);

获得NullPointerException

0 个答案:

没有答案