Apache POI fails to read numerical String

I’m trying to get the numerical string from an Excel file (image below) but for some reason POI or Java wont read the cell value in row 3 column E or row 2 column M but it has no problem retrieving the cell value from row 2 cell E.

Does anyone know why this is happening? Im struggling to find an answer to this.

Here’s my java code

getPostalCode = ExcelUtilsXSSF.getCellData(x, System_Constants.PostalCode);
            System.out.println("the postal code is "+getPostalCode);

And the java/poi code

public static String getCellData(int RowNum, int ColNum) throws Exception {
    try {
        Cell = ExcelWSheet.getRow(RowNum).getCell(ColNum);
        String CellData = Cell.getStringCellValue();
        return CellData;
        } catch (Exception e) {
        return "";

Image of the Excel file
enter image description here

Output to the console

the country is - Country
the state is - state
the city is - City
the address is - address
the postal code is - 
the employee is 1000-20000
the industry is IT
the company name is 3M Australia
the linkein company name is 
the firstname is - Joe 
the lastname is - Bloggs
the jobtitle is - Finance & IT Manager
the phone number is - 

Source: java

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.