You have to create the cell using row2.createCell(1)
before setting the value.
How to insert value in merged cell poi java
-
07-07-2023 - |
Pregunta
i have created new row then merge two cells then i want to get this merged cell to put value in it
my code :
sheet.createRow(1);
HSSFRow row2 = sheet.getRow(1);
HSSFCell cell = row2.getCell(1);
cell.setCellValue("معلومات الطالب");
sheet.addMergedRegion(CellRangeAddress.valueOf("A2:B2"));
but i get error java.lang.NullPointerException
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow