Skip to content
shoaibkhan-aspose edited this page Jul 14, 2014 · 2 revisions

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

Clone this wiki locally