lundi 20 janvier 2020

The operator > is undefined for the argument type(s) XSSFCell, int Java(536871072)

I want to compare two cell value, therefore, I added an if statement that helps me to compare it, here's the following code:

if (searchTheColumn != null && searchTheColumn2 != null) { // if that cell is present
                System.out.println(wb.getSheetAt(0).getRow(rowNumber).getCell(10) + "\t" + wb.getSheetAt(0).getRow(rowNumber).getCell(11));
                if (wb.getSheetAt(0).getRow(rowNumber).getCell(10) || wb.getSheetAt(0).getRow(rowNumber).getCell(11) > 300) // error here {

                }
                //int cellValue = dataFormatter.formatCellValue(searchTheColumn, formulaEvaluator); // get string cell value

        }

At the second if statement condition, I got an error that said The operator > is undefined for the argument type(s) XSSFCell, int, I wonder how do I fix it? I tried to use the data formatter, but it seems like it does not support it.

Aucun commentaire:

Enregistrer un commentaire