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

missing data for consequent duplicite lines #86

Open antonsjava opened 11 months ago

antonsjava commented 11 months ago

oo-ods-test.zip Hello

I just try sods for first time and it seems there is bug (maybe I don't understant it)

I try to make scenario where create and read ods file line by line.

sk.antons.sods.CreateDoc

sk.antons.sods.ReadDoc

scenario 1

scenario 2

So it seems that created ods file is somehow wrong for consequent reading by sods.

Thanks

github-actions[bot] commented 11 months ago

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

antonsjava commented 11 months ago

in attached file there are all generated files together with code so you can recreate them if you want

miachm commented 11 months ago

when you look to ./target/sods-output-copied.csv or ./target/sods-output-copied2.csv data of duplicate consequent lines are mising (only lastone is present)

I... Don't understand this line. You mean is missing data?

antonsjava commented 11 months ago

when you look at generated file ./target/sods-output-copied.csv or ./target/sods-output2-copied.csv

if you look on line 11 for example it looks like

;;;;;;;;

but it should be

3;3;3;;;;;;

data are mising

if you have 'same lines' in generated ods they are unable to read (until you explicitly save that ods file in office application) only last line for each serie of same lines are present (look to ./src/data/duplicate-lines.csv - result should look same - plus/minus of empty cells)

miachm commented 10 months ago

Okay found it. The interpretation of the tag "table:number-rows-repeated" is buggy in its reading implementation. It's not applying the value to the repeated rows.

LibreOffice is not using that tag in their files (at least in the example you gave me). That's why re-saving the file worked.

miachm commented 10 months ago

Fixed in the commit 858f0bb

miachm commented 10 months ago

Released into 1.6.7