POI Appending .0 while reading numeric data from excel
I am using POI HSSF to read excel data and I am using JUnit to check the data against database proc RefCursor. The Junit test fails as the numeric data from the Refcursor for example 100 are compared against the data in the excel sheet 100 but it fails as the POI reads it as 100.0. InputStream fileInputStream = Testdb.class.getClassLoader().getResourceAsStream(fileName); //retrieve number of columns and rows int numRows=0, numCols=0, i, j, minColIndex=0, maxColIndex=0; POIFSFileSystem fsFileSystem = new POIFSFileSystem(fileInputStream); HSSFWorkbook workBook = new HSSFWorkbook(fsFileSystem);