Package org.zkoss.poi.ss.util

Examples of org.zkoss.poi.ss.util.CellRangeAddressList.countRanges()


    return null;
  }
 
  private Map convertDataValidationToJSON(DataValidation dv) {
    final CellRangeAddressList addrList = dv.getRegions();
    final int addrCount = addrList.countRanges();
    final List<Map> addrmapary = new ArrayList<Map>(addrCount);
    for (int j = 0; j < addrCount; ++j) {
      final CellRangeAddress addr = addrList.getCellRangeAddress(j);
      final int left = addr.getFirstColumn();
      final int right = addr.getLastColumn();
View Full Code Here


    if (dstSheet.equals(srcSheet)) {
      for(DataValidation dataValidation : dataValidations) {
        CellRangeAddressList addrList = dataValidation.getRegions();
        boolean srcInRange = false;
        boolean dstInRange = false;
        for(int j = addrList.countRanges(); --j >= 0;) {
          final CellRangeAddress addr = addrList.getCellRangeAddress(j);
          if (!srcInRange) {
            srcInRange = addr.isInRange(srcRow, srcCol);
          }
          if (!dstInRange) {
View Full Code Here

    } else {
      final DataValidationHelper helper = dstSheet.getDataValidationHelper();
      for(DataValidation dataValidation : dataValidations) {
        CellRangeAddressList addrList = dataValidation.getRegions();
        boolean srcInRange = false;
        for(int j = addrList.countRanges(); --j >= 0;) {
          final CellRangeAddress addr = addrList.getCellRangeAddress(j);
          if (!srcInRange) {
            srcInRange = addr.isInRange(srcRow, srcCol);
          }
          if (srcInRange) {
View Full Code Here

    final int col = cell.getColumnIndex();
   
    final List<? extends DataValidation> dataValidations= BookHelper.getDataValidations(srcSheet);
    for(DataValidation dataValidation : dataValidations) {
      CellRangeAddressList addrList = dataValidation.getRegions();
      for(int j = addrList.countRanges(); --j >= 0;) {
        final CellRangeAddress addr = addrList.getCellRangeAddress(j);
        boolean inRange = addr.isInRange(row, col);
        if (inRange) {
          return dataValidation;
        }
View Full Code Here

      final int rngLastCol = range.getLastColumn();
     
      final List<? extends DataValidation> dataValidations = BookHelper.getDataValidations(srcSheet);
        for(DataValidation dataValidation : dataValidations) {
          CellRangeAddressList addrList = dataValidation.getRegions();
          for(int j = addrList.countRanges(); --j >= 0;) {
            final CellRangeAddress addr = addrList.getCellRangeAddress(j);
            if (addr.isInRange(rngRow, rngCol, rngLastRow, rngLastCol)) {
              //TODO: not fully mimic the scenario as excel
              //have to remove the whole data validation first
              range.getSheet().removeValidationData(dataValidation);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.