diff --git a/README.md b/README.md index f3f945a..eb24740 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Various spreadsheet file format notes. - [XLSB Short Records](/xlsb_short_records/README.md) - [Number Formats](/ssf/README.md) - [SpreadsheetML2003](/xlml/README.md) +- [LibreOffice Bugs](/lobugs/README.md) Project sponsored by [SheetJS](https://sheetjs.com) diff --git a/lobugs/README.md b/lobugs/README.md new file mode 100644 index 0000000..3f92384 --- /dev/null +++ b/lobugs/README.md @@ -0,0 +1,39 @@ +# LibreOffice Bugs + +## Rounding and "ulp" errors + +[Original SheetJS Bug Report](https://github.com/SheetJS/sheetjs/issues/1814) + +[Original LO Bug Report](https://bugs.documentfoundation.org/show_bug.cgi?id=83511) + +Excel will write the full IEEE754 value. This affects values like `0.1 + 0.2` +which have stored values like `0.30000000000000004`. Excel "General" formatting +is strategically chosen to cap at 11 digits, avoiding these issues in display. + +LibreOffice rounds off the last few digits. + +The following files are referenced in the issues: + +- [Original issue file](./xls_issue_49.xls) +- [File Resaved in Excel 2011](./xls_issue_49_2011.xlsx) +- [File Resaved in Excel 2013](./xls_issue_49_2013.xlsx) +- [File Resaved in Excel 2013 "Strict OpenXML"](./xls_issue_49_2011_strict.xlsx) +- [File Resaved in LibreOffice](./xls_issue_49_libreoffice.xlsx) + +Look at cell C172 in the sheet1.xml subfile of each. The Excel files show: + +```xml + + 3.2400000000000005E-2 + +``` + +The LO file shows: + +```xml + + 0.0324 + +``` + +[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/notes?pixel)](https://github.com/SheetJS/notes) diff --git a/lobugs/xls_issue_49.xls b/lobugs/xls_issue_49.xls new file mode 100644 index 0000000..38fb766 Binary files /dev/null and b/lobugs/xls_issue_49.xls differ diff --git a/lobugs/xls_issue_49_2011.xlsx b/lobugs/xls_issue_49_2011.xlsx new file mode 100644 index 0000000..24cfcc1 Binary files /dev/null and b/lobugs/xls_issue_49_2011.xlsx differ diff --git a/lobugs/xls_issue_49_2013.xlsx b/lobugs/xls_issue_49_2013.xlsx new file mode 100644 index 0000000..997f79f Binary files /dev/null and b/lobugs/xls_issue_49_2013.xlsx differ diff --git a/lobugs/xls_issue_49_2013_strict.xlsx b/lobugs/xls_issue_49_2013_strict.xlsx new file mode 100644 index 0000000..1e72440 Binary files /dev/null and b/lobugs/xls_issue_49_2013_strict.xlsx differ diff --git a/lobugs/xls_issue_49_libreoffice.xlsx b/lobugs/xls_issue_49_libreoffice.xlsx new file mode 100644 index 0000000..1aff895 Binary files /dev/null and b/lobugs/xls_issue_49_libreoffice.xlsx differ