List of usage examples for org.apache.poi.ss.usermodel Sheet removeRowBreak
void removeRowBreak(int row);
From source file:net.sf.excelutils.ExcelUtils.java
License:Apache License
/** * parse Excel Template File/*ww w. j a va2 s. c o m*/ * * @param context datasource * @param sheet Workbook sheet */ public static void parseSheet(Object context, Workbook wb, Sheet sheet) throws ExcelException { try { ExcelParser.parse(context, wb, sheet, sheet.getFirstRowNum(), sheet.getLastRowNum()); try { // remove the last #page int breaks[] = sheet.getRowBreaks(); if (breaks.length > 0) { sheet.removeRowBreak(breaks[breaks.length - 1]); } } catch (Exception ne) { } } catch (Exception e) { throw new ExcelException("parseSheet error: ", e); } finally { ExcelUtils.context.set(null); } }