Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libreoffice ask to repair the file #486

Open
sandropigreco opened this issue Oct 1, 2024 · 6 comments
Open

Libreoffice ask to repair the file #486

sandropigreco opened this issue Oct 1, 2024 · 6 comments

Comments

@sandropigreco
Copy link

After repair the file works correctly. With Onlyoffice (linux) and Microsoft Excel (windows) there is no problem

Screenshot From 2024-10-01 09-58-39

I'm using libreoffice 24.8 under Archlinux system.

@meiMingle
Copy link
Collaborator

meiMingle commented Oct 14, 2024

@sandropigreco If you can provide me with that file or the code, I'd be happy to help resolve this issue.

@sandropigreco
Copy link
Author

Hi, thanks for your support.
This is the code and the attached excel file

os = new FileOutputStream(filename, true); Workbook wb = new Workbook(os, "MyApplication", "1.0"); wb.setGlobalDefaultFont("Arial", 15.5); wb.properties() .setTitle("title property") .setCategory("category property") .setSubject("subject property") .setKeywords("keywords property") .setDescription("description property") .setManager("manager property") .setCompany("company property") .setHyperlinkBase("hyperlinkBase property"); Worksheet ws = wb.newWorksheet("Sheet 1"); ws.value(0, 0, "title 1"); ws.value(0, 1, "title 2"); ws.value(0, 2, "title 3"); ws.freezePane(0, 1); ws.finish(); wb.finish(); wb.close();

excel.xlsx

@meiMingle
Copy link
Collaborator

OK, I'll check this out as soon as I have time

@leiblix
Copy link

leiblix commented Oct 18, 2024

I also have this problem. The error appears in the newer versions of LibreOffice, as version 24.2.4.2 had no issues. After updating to version 24.2.6.2, I observed similar behavior.

I believe the issue is not with the internal structure itself, but rather with the generation of the zip archive. When I extract the relevant Excel file and then rezip it using a standard Linux utility, the spreadsheet is no longer corrupted.

@leiblix
Copy link

leiblix commented Oct 18, 2024

I found out that the Apache POI library suffers from this too. It has been reported on the LibreOffice issue tracker here: https://bugs.documentfoundation.org/show_bug.cgi?id=163384.

@jkubos
Copy link

jkubos commented Nov 7, 2024

We have experienced the same behavior in Python openpyxl library. Version 3.1.4 produces bad output, 3.1.5 is OK. Unfortunately there is no changelog yet and I was't able to find issue which fixed it https://foss.heptapod.net/openpyxl/openpyxl/-/issues/?sort=updated_desc&state=closed&first_page_size=100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@jkubos @leiblix @meiMingle @sandropigreco and others