title: Edit data in excel sheet through java ,getting null pointer exception
body: <p>I am trying to update some entries in existing excel sheet .Below is my code</p>
  
  <pre><code> System.out.println("Update excel block");
           FileInputStream fsIP= new FileInputStream("C:\\Users\\SXR8036\\Downloads\\LANE-804.xls"); 
          // System.out.println(Path);
           System.out.println("Trying to update the file");
           HSSFWorkbook wb = new HSSFWorkbook(fsIP);//Access the workbook
           HSSFSheet worksheet = wb.getSheetAt(0);//Access the worksheet, so that we can update / modify it
  
           Cell cell = null;
           cell = worksheet.getRow(2).getCell(2);// Access the second cell in second row to update the value
  
           cell.setCellValue("OverRide Last Name");
           fsIP.close(); //Close the InputStream
  
           FileOutputStream output_file =new FileOutputStream(new File("C:\\Users\\SXR8036\\Downloads\\LANE-804.xls"));  //Open FileOutputStream to write updates
  
           wb.write(output_file); //write changes
  
           output_file.close();  //close the stream   
  </code></pre>
  
  <p><strong>I am getting NUll pinter exception as error</strong> >i have read quite about null pointer exception now but not able to find a solution to this.</p>