InputStream inStream = new FileInputStream("workbook.xls");
Workbook workbook = WorkbookFactory.create(inStream);
Sheet sheet = workbook.createSheet();
Row row = sheet.createRow(0);
row.setZeroHeight(true);
Workbook workbook = new Workbook("workbook.xls");
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
cells.hideRow(2); //Hiding the 3rd row of the worksheet
cells.hideColumn(1); //Hiding the 2nd column of the worksheet
Download Source Code