Reputation: 1
When i try to parse ods sheet using jopentextformat from java code, there is a exception thrown which is given below. Note that the row and column of the first merged cell fetches the data where the second cell of the merged cell throws the following error. Please help me with this. I'm converting each cell into string so that I can compare and parse the data. While fetching the merged cell(second cell of the merged cell) this happens.
public String getCellValueAt(int rowIndex, int columnIndex) {
Sheet s;
String cellVal;
if (s.getCellAt(columnIndex, rowIndex).getValue() != null) {
cellVal = s.getCellAt(columnIndex, rowIndex).getValue().toString();
if(cellVal != null && cellVal != "") {
cellVal = cellVal.trim();
}
}
else {
cellVal = " ";
}
return cellVal;
}
//exception given below
java.lang.IllegalArgumentException: invalid cell <table:covered-table-cell xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" />
at org.jopendocument.dom.spreadsheet.Row.getValidCellAt(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
at org.jopendocument.dom.spreadsheet.Row.getMutableCellAt(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
at org.jopendocument.dom.spreadsheet.Table.getCellAt(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
Upvotes: 0
Views: 228