I am using Apache POI (version 3.9) framework for dealing with excel files, i.e. reading excel file.
I am having trouble with number types. User can write a number in excel file with comma or dot as decimal separator, i.e. 12.34 or 12,34, for various reasons.
Now, I would like to get that value as it is (i.e. if it is 12.34, then I would like to get 12.34, or if it is 12,34, then I would like to get 12,34), but instead POI Cell preliminary gives me a double with dot as decimal separator. So, if a cell value was 12,34, POI Cell would give double of value 12.34.
This behaviour is not what I would like to be. I would like to get the value that was entered (12,34).
How to avoid/solve this?
I have searched Stackoverflow for similar problems and tried to use solution given in thread How can I read numeric strings in Excel cells as string (not numbers) with Apache POI? and also tried using alternative org.apache.poi.ss.usermodel.DataFormatter
class, and it works, but it does not work when the the value is 12,34 and type of cell is Number defined in Excel file itself.