miachm / SODS

A simple Java library for handle ODS (Open Document Spreadsheet, compatible with Excel and Libreoffice)
The Unlicense
74 stars 30 forks source link

Currency fields don't seem to work (format and larger values) #57

Closed sdaschner closed 1 year ago

sdaschner commented 1 year ago

The formatting with currency fields don't seem to be displayed. I've tried the code in your ValueTypeTest.java and the resulting Spreadsheet is not formatted, it just displays -5. Also the values seem to be cut weirdly if they are greater than 999, e.g. try the following:

OfficeCurrency canada = new OfficeCurrency(Currency.getInstance(Locale.CANADA), -3050.5d);
OfficeCurrency eur = new OfficeCurrency(Currency.getInstance("EUR"), -2567.5d);
Sheet sheet = new Sheet("A", 1, 2);

sheet.getDataRange().setValues(canada, eur);
// ...

This results in a sheet displaying -3 and -2 for me...

github-actions[bot] commented 1 year ago

Thanks for your report! Please ensure you have provided enough info in order to recreate the issue, including the problematic ODS File.

miachm commented 1 year ago

Fixed in v1.5.3