Cuando obtengo contenido de celda usando la Biblioteca Apache-POI, obtengo tanto "No se puede obtener un valor numérico de una celda de texto" como el reverso de eso. ¿Cómo lo soluciono?

Me doy cuenta de que la pregunta es un poco confusa, pero no sabía cómo decirla. De todos modos, aquí está el código original:

private void readFile(String excelFileName) throws FileNotFoundException, IOException {
    XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(excelFileName));
    if (workbook.getNumberOfSheets() > 1){
        System.out.println("Please make sure there is only one sheet in the excel workbook.");
    }
    XSSFSheet sheet = workbook.getSheetAt(0);
    int numOfPhysRows = sheet.getPhysicalNumberOfRows();
    XSSFRow row;
    XSSFCell num;
    for(int y = 1;y < numOfPhysRows;y++){    //start at the 2nd row since 1st should be category names
        row = sheet.getRow(y);
        poNum = row.getCell(1);
        item = new Item(Integer.parseInt(poNum.getStringCellValue());
        itemList.add(item);
        y++;
    }
}

private int poiConvertFromStringtoInt(XSSFCell cell){
    int x = Integer.parseInt(Double.toString(cell.getNumericCellValue()));
    return x;
}

Estoy teniendo el siguiente error

Exception in thread "main" java.lang.IllegalStateException: Cannot get a numeric value from a text cell
    at org.apache.poi.xssf.usermodel.XSSFCell.typeMismatch(XSSFCell.java:781)
    at org.apache.poi.xssf.usermodel.XSSFCell.getNumericCellValue(XSSFCell.java:199)

Incluso si lo cambio para obtener una cadena usandoXSSFCell.getStringCellValue() o inclusoXFFSCell.getRichTextValue, Obtengo el reverso del mensaje de error anterior (y me estoy asegurando de que finalmente sea un int usandoInteger.parseInt(XSSFCell.getStringCellValue()).

El error luego lee:

Exception in thread "main" java.lang.IllegalStateException: Cannot get a text value from a numeric cell
    at org.apache.poi.xssf.usermodel.XSSFCell.typeMismatch(XSSFCell.java:781)
    at org.apache.poi.xssf.usermodel.XSSFCell.getNumericCellValue(XSSFCell.java:199)

Sé con certeza que la columna de la hoja de cálculo de Excel es, de hecho, una cadena. No puedo cambiar la hoja de Excel, ya que se carga, ya que siempre usar el mismo formato y formatear cada columna primero requiere mucho tiempo de procesamiento.

¿Alguna sugerencia

[Solución] Aquí está el código de solución que se me ocurrió con la ayuda de @ Wivani:

private long poiGetCellValue(XSSFCell cell){
    long x;
    if(cell.getCellType() == 0)
        x = (long)cell.getNumericCellValue();
    else if(cell.getCellType() == 1)
        x = Long.parseLong(cell.getStringCellValue());
    else
        x = -1;
    return x;
}

Respuestas a la pregunta(7)

Su respuesta a la pregunta