I have Excel file and some contents, coming from external source(database, file, whatever). I've encountered problems with numeric cells in Excel -getNumericValue returns double value for any cell, no matter how value is formatted in it. External source returns string representations of numbers, i.e. it may return "301" and "301.0" and these are different values, and i don't know which type may be in which case. But if i have "301" in Excel file, getNumericValue method will always return "301.0", so if i need to compare values from external source and from excel, "301" in excel will be different from "301" from external source, as they will have different string representations.
Long story short, can you show me the working way to get string representation of cell value as it looks in Excel? I have only HSSF* classes available for using.