Example usage for org.apache.poi.ss.util CellRangeAddressList getCellRangeAddress

List of usage examples for org.apache.poi.ss.util CellRangeAddressList getCellRangeAddress

Introduction

In this page you can find the example usage for org.apache.poi.ss.util CellRangeAddressList getCellRangeAddress.

Prototype

public CellRangeAddress getCellRangeAddress(int index) 

Source Link

Usage

From source file:de.jlo.talendcomp.excel.SpreadsheetOutput.java

License:Apache License

private boolean checkIfIsAppendedDataValidationNeccessary(DataValidation originalDv, int lastRowIndex) {
    CellRangeAddressList originalAl = originalDv.getRegions();
    int originalLastDataRow = 0;
    for (int i = 0; i < originalAl.countRanges(); i++) {
        CellRangeAddress cra = originalAl.getCellRangeAddress(i);
        if (cra.getLastRow() > originalLastDataRow) {
            originalLastDataRow = cra.getLastRow();
        }//from w w  w.  j  av a2  s  .  c o m
    }
    return (originalLastDataRow < lastRowIndex);
}