I am using an excel template to write data into it using SXSSFWorkbook. My template contains 2 rows initially (one is for column name and one more). I want to overwrite the data of first rows on some conditions (if/else). I am using below line of code to achieve this
sheet.getRow(0).getCell(2).setCellValue("Editable");
but getting Null Pointer Exception. Please help.
Please refer the attached screenshot of my excel template
How come the above statement can return Null?
I read somewhere that you can not read excel using SXSSFWorkbook. If so please provide any alternate solution.
Note - I have to use SXSSFWorkbook as I have to write huge amount of data in sheet.
Thank you.