ozlerhakan/poiji

Can a number which contains decimal comma be transformed correctly?

acuciureanu opened this issue · 1 comments

I have the following problem with Poiji:

A small XLSX table:

MyType Count
Unknown 1,234
public class MyTypeSheet {
    @ExcelCellName("MyType")
    private String type;

    @ExcelCellName("Count")
    private String count;

    @Override
    public String toString() {
        return "MyType{" +
                "type='" + type + '\'' +
                ", countMeasure='" + count + '\'' +
                '}';
    }
}

The value of the "count" property becomes "1,2,3,4" instead of "1,234" (its type is String)

MyType{type='TestType', count='1,2,3,4'}

If the count field has the type Integer or int then the output is the following:

MyType{type='TestType', count='0'}

Is there anything else I have to do for getting this right?

I resolved the problem with a Casting implementation.