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

Regression: Cannot open file in 1.5.0 #47

Closed ircecho closed 2 years ago

ircecho commented 2 years ago

Timelog.ods

Exception in thread "main" java.lang.IndexOutOfBoundsException: Range goes out of bounds: (end_of_range: 1024, maxcolumns in sheet: 35
    at com.github.miachm.sods.Range.<init>(Range.java:37)
    at com.github.miachm.sods.Sheet.getRange(Sheet.java:407)
    at com.github.miachm.sods.OdsReader.processCells(OdsReader.java:459)
    at com.github.miachm.sods.OdsReader.processTable(OdsReader.java:347)
    at com.github.miachm.sods.OdsReader.processSpreadsheet(OdsReader.java:280)
    at com.github.miachm.sods.OdsReader.iterateFilesEntries(OdsReader.java:273)
    at com.github.miachm.sods.OdsReader.processContent(OdsReader.java:81)
    at com.github.miachm.sods.OdsReader.load(OdsReader.java:46)
    at com.github.miachm.sods.OdsReader.load(OdsReader.java:38)
    at com.github.miachm.sods.SpreadSheet.<init>(SpreadSheet.java:52)
    at com.github.miachm.sods.SpreadSheet.<init>(SpreadSheet.java:39)
    at Main.execute(Main.java:46)
        SpreadSheet spread = new SpreadSheet(new File("/home/.../Timelog.ods"));

Works in 1.4.0

github-actions[bot] commented 2 years ago

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

miachm commented 2 years ago

Yes! It seems an easy fix. Let's see if I can create a new release for this.

miachm commented 2 years ago

New release launched. It should be solved in v1.5.1