I would love it if the Java Snippet getCell method could return an array or if it didn’t require me to specify a type and it just returned the data in the cell in its original type.
Hi @kgeis,
the problem is Java need a type to write the cell in. Otherwise, how would you later on access the type? It would not be possible without knowing which data type it is. You could save all of the cells in a String Array with the method as below:
String[] allCells = new String[getColumnCount()];
for(int i = 0; i< getColumnCount(); i++) {
allCells[i] = getCell(i, tString);
}
Cheers, Iris
Thanks, Iris. I’m talking about the case where a cell contains array-valued data. There is no way in a Java Snippet to access the array because getCell(…) requires passing the type, and tArray or such is not an available option.
It seems to me that streams must contain information about their type, so I still don’t understand why the type argument is needed in getCell(…).