Here is the code I have used. with this I am able to delete the content but not the cell. please help me with this.
File f=new File("C:\\Users\\ALLANSH1\\Desktop\\GL_PLATEAU.xlsx");
FileInputStream fis=new FileInputStream(f);
XSSFWorkbook workbook=new XSSFWorkbook(fis);
XSSFSheet mysheet=workbook.getSheetAt(0);
int l=mysheet.getLastRowNum();
java.util.Iterator rowIter =mysheet.iterator();
while(rowIter.hasNext())
{
XSSFRow row=(XSSFRow)rowIter.next();
XSSFCell cell=row.getCell(5);
row.removeCell(cell);
}
System.out.println(l);
FileOutputStream fos=new FileOutputStream("C:\\Users\\ALLANSH1\\Desktop\\GL.xlsx");
workbook.write(fos);
}