Example usage for org.apache.poi.ss.formula.eval AreaEval getLastRow

List of usage examples for org.apache.poi.ss.formula.eval AreaEval getLastRow

Introduction

In this page you can find the example usage for org.apache.poi.ss.formula.eval AreaEval getLastRow.

Prototype

int getLastRow();

Source Link

Document

returns the 0-based index of the last row in this area.

Usage

From source file:com.dataart.spreadsheetanalytics.api.model.ICustomFunction.java

License:Apache License

static List<ValueEval> prepareQueryArgs(List<ValueEval> queryArgs) throws EvaluationException {
    List<ValueEval> args = new LinkedList<>();

    for (ValueEval arg : queryArgs) {

        if (arg instanceof AreaEval) {
            AreaEval range = (AreaEval) arg;

            for (int i = range.getFirstRow(); i <= range.getLastRow(); i++) {
                for (int j = range.getFirstColumn(); j <= range.getLastColumn(); j++) {
                    args.add(getSingleValue(arg, i, j));
                }/*w  w  w. ja v a  2s.c o  m*/
            }
        } else {
            args.add(arg);
        }
    }

    return args;
}