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

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

Introduction

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

Prototype

int getFirstRow();

Source Link

Document

returns the 0-based index of the first 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  ww .  ja v  a2 s .  com
            }
        } else {
            args.add(arg);
        }
    }

    return args;
}