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

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

Introduction

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

Prototype

int getFirstColumn();

Source Link

Document

returns the 0-based index of the first col 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));
                }//from   w  w w  .  j av  a2  s . co m
            }
        } else {
            args.add(arg);
        }
    }

    return args;
}