-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Using the WriteTo() method with go 1.21 got problems #1734
Comments
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, #1637, #1641, #1642, #1648, #1651, #1652, #1656, #1657, #1660, #1663, #1670 and #1686. 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 it has been fixed on Go 1.21.1. Please using the Go 1.20.11 and previous Go released version or upgrade to Go 1.21.1 and later. 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. |
Thank you for reply. Hope it will be fixed soon |
This issue already has been fixed in https://go.dev/cl/466295. As my reply in above, it has been fixed on Go 1.21.1. So please using the Go 1.20.11 and previous Go released version or upgrade to Go 1.21.1 and later. |
ok,thank you |
Description
We used excelize in the project, and in our business scenario, I need to call the WriteTo() method to create an Excel file. When I use go 1.18.10.0, this is completely feasible. Recently, we switched to go 1.21.0.0 and found that the generated Excel file is damaged. After converting to an XML file, it was found that each tag contains the xmlns="" attribute. After careful investigation, we found that the cause should be the 1.21 version of go.
Code And Result
here is the code
This is the XML generated for Excel conversion in version 1.21
This is the XML generated for Excel conversion in version 1.18
The file generated by Go 21 version cannot be opened in Excel, and Excel will report an error that needs to be fixed
Conclusion
the diffrent is the
xmlns=""
attr and the go 1.21 version seems to be the reason,can you fix this bug? After all, it's due to the upgrade of the Go versionThe text was updated successfully, but these errors were encountered: