I've encountered a surprising problem using jOpenDocument to read ods file
created by libreoffice calc version 7.0.1: the contents of text cells are
returned as null.
I've been using jOpenDocument to read ods files for years and have never
encountered any problems before.
E.g. I have an ods file with text in cell 0,0 of the first sheet, which I
access with:
File ods = new File("some_file.ods");
SpreadSheet spreadSheet = SpreadSheet.createFromFile(ods);
Sheet sheet = spreadSheet.getFirstSheet();
MutableCell x = sheet.getCellAt(0,0);
Then
x.isValid(); // returns true
x.isEmpty(); // returns false
x.getValueType(); // returns STRING
*But*
x.getValue(); // returns null
x.getTextValue(); // returns null
This problem turned up when I upgraded to libreoffice 7.01, specifically
1:7.0.1~rc1-1~bpo10+1 amd64. It occurs in any file created *or opened *by
libreoffice calc version 7.0.1
FYI I'm using jOpenDocument-1.4rc2 on a debian 10 (buster) system.
Reverting to version 1.6.5-3 (1:6.1.5-3+deb10u6) solves the problem. In
fact, a file created with version 7.01 that has subsequently been opened
with version 1.6.5-3 is readable.
The problem does not occur reading 'float' cells. I have not tested other
cell types.
Does anyone have any idea what might be causing a problem like this?
It would be a quite serious problem if jOpenDocument can't read files
created by future versions of libreoffice.
Thanks,
--
---
You received this message because you are subscribed to the Google Groups
"jOpenDocument" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jopendocument/03bb8601-a2a7-4afd-8bb6-e78d823e906dn%40googlegroups.com.