title: Writing data to cell in existing excel through hssf/xssf.
body: <p>I am in a dilemna. I have been trying to write data into an existing excel file through hssf/xssf in Java. I have no errors but still when I run it can't get change made to the excel sheet. Can anyone help me out with this? My code is:</p>
  
  <pre><code>try {
      FileInputStream inp = new FileInputStream("C:/Users/Training/Desktop/saurav.xlsx");  
  
  
              Workbook wb = null;
              try {
                  wb = WorkbookFactory.create(inp);
              } catch (InvalidFormatException e) {
                  e.printStackTrace();
              }  
              Sheet sheet = wb.getSheetAt(0);  
              Row row = sheet.getRow(3);  
              Cell cell = row.getCell(4);  
              if (cell == null)  
                  cell = row.createCell(4);  
              cell.setCellType(Cell.CELL_TYPE_STRING);  
              cell.setCellValue("a test");  
  
              // Write the output to a file  
              FileOutputStream fileOut = new FileOutputStream("C:/Users/Training/Desktop/saurav.xlsx");  
              wb.write(fileOut);  
              fileOut.close();  
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Someone please help me out with this.Trying this out since last 2 days.</p>