I'm trying to check if cell is numeric or empty.
So I wrote this code
...
int columnIndex = 1
while(columnIndex < numberOfColumns && matrixSheet.getRow(0).getCell(columnIndex).stringCellValue != '') {
if (matrixSheet.getRow(rowIndex).getCell(columnIndex).getCellType() == Cell.CELL_TYPE_NUMERIC)
orderOfActivities.add(matrixSheet.getRow(rowIndex).getCell(columnIndex) - 1, matrixSheet.getRow(0).getCell(columnIndex))
columnIndex++
}
...
However, I got this error :
Reason: groovy.lang.MissingMethodException: No signature of method: org.apache.poi.xssf.usermodel.XSSFCell.minus() is applicable for argument types: (java.lang.Integer) values: [1] Possible solutions: find(), is(java.lang.Object), find(groovy.lang.Closure), any(), print(java.lang.Object), with(groovy.lang.Closure)
On the following line : if (matrixSheet.getRow(rowIndex).getCell(columnIndex).getCellType() == Cell.CELL_TYPE_NUMERIC)
Someone has any idea ? Thanks a lot!
UPDATE 1
A | B | C | D | E |
1 | Text1 Text2 Text3 ...
2 | Val1 2 1
3 | Val2 1 2
4 | Val3 1
5 | ...