title: Writing data to the Excel,showing Null pointer Exception
body: <p>I am a beginner to the selenium WebDriver.
  This is the part of my selenium code for writing data to the excel sheet,but while executing the code i am getting NullPointer Exception...what will be the reason..?(excel sheet is in closed state,No compiletime issue)</p>
  
  <p>code:</p>
  
  <pre><code>FileInputStream fis=new FileInputStream("C:\\Users\\Desktop\\Book1.xlsx");
  
  Workbook wb=WorkbookFactory.create(fis);
  Sheet sh=wb.getSheet("Sheet1");
  
  for(int i=0;i&lt;=20;i++) {
      Row row=sh.getRow(i);
  
      for(int m=0;m&lt;=20;m++) {
          Cell cell=row.createCell(m);
  
          cell.setCellType(cell.CELL_TYPE_STRING);
          cell.setCellValue("good");
  
          FileOutputStream fos=new FileOutputStream("C:\\Users\\Desktop\\Book1.xlsx");
  
          wb.write(fos);
          fos.close();
      }
  }
  
  System.out.println("Excel File Written");
  </code></pre>