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

Corrupted file #1641

Closed
Cr4psy opened this issue Aug 31, 2023 · 3 comments
Closed

Corrupted file #1641

Cr4psy opened this issue Aug 31, 2023 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@Cr4psy
Copy link

Cr4psy commented Aug 31, 2023

The generated excel file is corrupted, trying to repair the file doesn't seem to work. The sheets are created but no values are included. No errors are returned by the program.

Steps to reproduce the issue:

  1. Run the create spreadsheet example code
  2. Open the file

Describe the results you received:
No error when running the program.
Error when opening the excel file:

Alert
We found a problem with some content in ’Book1.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.

If Yes is pressed the following message appear

Excel was able to open the file by repairing or removing the unreadable content.

The file opens but no data is present in the sheets.

Corrupted file created:
Book1.xlsx

Describe the results you expected:
No error when opening the file and a file with two sheets.

Output of go version:

go1.21.0 darwin/arm64

Excelize version or commit ID:

v2.8.0

Environment details (OS, Microsoft Excel™ version, physical, etc.):
Microsoft Excel for Mac Version 16.76
MacOS Ventura 13.1
Apple M1

@Cr4psy
Copy link
Author

Cr4psy commented Aug 31, 2023

Realised a similar issue was raised some minutes ago #1640

@Cr4psy
Copy link
Author

Cr4psy commented Aug 31, 2023

Interestingly, I tried to run the same code using go1.20.7 and it works.

@xuri
Copy link
Member

xuri commented Aug 31, 2023

Thanks for your issue. If you are reporting a new issue, make sure that we do not have any duplicates already exist. If it does not work with Go 1.21.0, please reference the issues #1465, #1595, #1603, #1608, #1614, #1619, #1620, #1621, #1623, #1633 and #1637. There are some incompatible changes in the Go 1.21.0 encoding/xml library. I have given feedback to the Go team and created a patch for it (golang/go#61881), and the Go team has added golang/go#62051 to the Go 1.21.1 milestone. I suggest using the Go 1.20.7 and previous Go released version or waiting for the next Go minor releases. I have added notice on the README and documentation website for this, and I've closed this. If you have any questions, please let me know, and reopen this anytime.

@xuri xuri closed this as completed Aug 31, 2023
@xuri xuri added the duplicate This issue or pull request already exists label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants