Menu

Hide Unhide Cells

Shoaib

Apache POI SS

InputStream inStream = new FileInputStream("workbook.xls");
Workbook workbook = WorkbookFactory.create(inStream);
Sheet sheet = workbook.createSheet();
Row row = sheet.createRow(0);
row.setZeroHeight(true);

Aspose.Cells

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


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.