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

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

Introduction

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

Prototype

int getLastColumn();

Source Link

Document

returns the 0-based index of the last 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));
                }//www  . jav a 2  s  .com
            }
        } else {
            args.add(arg);
        }
    }

    return args;
}