*/
public static List toListHelper(List result, Object arg, boolean skipBoolean, boolean skipText, XelContext ctx){
if (arg instanceof SSError) {
throw new SSErrorXelException((SSError) arg);
} else if (arg instanceof Range) { // a range, iterator thru available cells
final Range rng = (Range) arg;
final Book book = rng.getSheet().getBook();
final Collection cells = rng.getCells();
for(final Iterator it = cells.iterator(); it.hasNext();) {
final Cell cell = (Cell) it.next();
toListHelper(result, cell.getResult(), skipBoolean, skipText, (XelContext) book); // recursive
}
} else if (arg instanceof Range[]) { //a range array, iterator thru available ranges
for (int j = 0; j < ((Range[])arg).length; ++j) {
final Range rng = (Range) ((Range[])arg)[j];
final Book book = rng.getSheet().getBook();
toListHelper(result, rng, skipBoolean, skipText, (XelContext) book); // recursive
}
} else if (arg instanceof String) {
if (!skipText) {
result.add(Objects.ZERO_DOUBLE);