POI XSSF class Throws NullPointerException when createCell or setCellValue to empty row in existing Excel
If Existing Excel's row is fill with data then .. below code will execute and override the data.. CODE :
rowsline= sourceSheet.getRow(RowNo);
rowsline.createCell(CellNo);
rowsline.getCell(CellNo).setCellValue(DataValue);
outputStream = new FileOutputStream(file);
srcBook.write(outputStream);
ERROR :
Exception in thread "main" java.lang.NullPointerException
at Source_Program.SourceProgram.SetDataInExcel(SourceProgram.java:146)