List of usage examples for org.apache.poi.xssf.streaming SXSSFSheet getNumMergedRegions
@Override public int getNumMergedRegions()
From source file:com.plugin.excel.util.ExcelUtil.java
License:Apache License
/** * //from ww w . j a v a 2 s. com * @param sheet * the sheet containing the data. * @param rowNum * the num of the row to copy. * @param cellNum * the num of the cell to copy. * @return the CellRangeAddress created. */ public static CellRangeAddress getMergedRegion(SXSSFSheet sheet, int rowNum, short cellNum) { for (int i = 0; i < sheet.getNumMergedRegions(); i++) { CellRangeAddress merged = sheet.getMergedRegion(i); if (merged.isInRange(rowNum, cellNum)) { return merged; } } return null; }