Thanks. I was unaware of the change in LO. Please post a notice when 1.3 is supported.
On Monday, September 14, 2020 at 9:27:22 AM UTC-7 ILM wrote: > Le 31/08/2020 à 21:41, bdw...@gmail.com a écrit : > > There's an error in my description of the problem. > > > > x.getValue() and x.getTextValue() do not return null. They throw > NullPointerExceptions. E.g. > > > > Exception in thread "main" java.lang.NullPointerException > > at org.jopendocument.dom.text.TextNode.getCharacterContent(Unknown > Source) > > at > org.jopendocument.dom.text.TextNode.getChildrenCharacterContent(Unknown > Source) > > at > org.jopendocument.dom.text.TextNode.getChildrenCharacterContent(Unknown > Source) > > at org.jopendocument.dom.spreadsheet.Cell.getTextValue(Unknown > Source) > > at org.jopendocument.dom.spreadsheet.Cell.getTextValue(Unknown > Source) > > at org.jopendocument.dom.spreadsheet.Cell.getTextValue(Unknown > Source) > > at org.jopendocument.dom.spreadsheet.Cell.getValue(Unknown Source) > > at test.ODSTEst.main(ODSTEst.java:35) > > > > On Monday, August 31, 2020 at 2:58:02 AM UTC-7 guillaume...@gmail.com > wrote: > > > > Hi, > > > > Could you provide us the smallest document having this issue in order to > investigate > > and to make it works on the next jOpenDocument version? > > > > Thanks. > > > > Guillaume > > > > Le lun. 31 août 2020 à 11:55, bdw...@gmail.com <bdw...@gmail.com> a > écrit : > > > > 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? > > > Hi, > > Yes, LO 7 switched to OpenDocument 1.3. We're working on supporting > it. In the mean time, you > can change the format to "1.2 extended". Go to Options, then Load/Save, > then General, then ODF > format version. > > Cheers, > > Sylvain > > -- --- 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 jopendocument+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jopendocument/bbf8814b-1e31-4915-ba30-fa4c93a789c4n%40googlegroups.com.