-
-
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
Version compatibility issue: Unable to write any cells under golang 1.21.0. #1603
Comments
Thanks for your issue. This was similar with #1465, #1595. There are some incompatible changes in the Go 1.21 encoding/xml library. I have given feedback to the Go team and created a patch for it, and still waiting for a reply. Please apply the patchsets in the CL https://go.dev/cl/466295 if you can. |
I just found this problem too。 |
Is it compatible with go1.21? It will be a long time before the official merger. Projects that rely on excelize will not be able to use go1.21 |
Removing the https://go.dev/play/p/z-acRVzkk6G That should work as long as the type is not marshaled directly and its usage in other structs has the proper |
Hi @fifsky. I'll consider revendoring Go encoding/xml package in 1.16.15 (for backward compatible) in |
OK, thank you for your reply |
Hi @fifsky, I noticed that the Go team has added golang/go#62051 to the Go1.21.1 milestone, so I suggest waiting for the next minor releases, and you can vendoring the Go encoding/xml package by yourself if you need to. |
Yeah, but we also need to marshal sub-type structs variable directly (such as marshal type variable |
@xuri I noticed that, too, thanks |
I just found this problem too。 |
Got the same problem. This must the first time since my using Go, that I'm forced to go back a version! Hope that we don't end up needing to keep different versions of Go! |
What is involved in "vendoring the Go encoding/xml package"? Any pointers on how to attempt this? is this a simple change to the go.mod file, or some other process? |
I have vendoring Go 1.16.15's encoding/xml package in github.com/xuri/xml, I will use it in the Excelize instead of encoding/xml standard library tomorrow, after that, you can upgrade the Excelize library with the master branch code, and these changes will be released in the next Excelize version, if Go 1.21.1 not yet released. |
Since vendoring Go 1.16.15 encoding/xml will introduce security issues CVE-2022-28131 (fixed in the go1.18.4) and CVE-2022-30633 (fixed in the go1.18.10), so I suggest waiting for the next Go minor releases or vendoring Go 1.18.10 encoding/xml (made the Excelize require minimum Go version to Go 1.18). |
Agreed to upgrade the minimum version to go 1.18 |
@xuri |
Yes, I suggest using the Go 1.20.7 and previous Go released version or waiting for the next Go minor releases. |
The Go 1.21.1 is released, this issue has been fixed. |
Not working on "go version go1.22.6 linux/amd64" SaveAs and SetCellValue are not returning anything |
Could you show us a complete, standalone example program or reproducible demo? |
Description
This morning, after an automatic upgrade to
1.21.0
, I noticed that excelize is unable to write any cells, even using the examples from the official readme. The sheets, however, appear to be functioning normally. There are no error messages during the usage ofSetCellValue
andSaveAs
, but the cell contents remain blank.I didn't make any code changes; I simply replaced
go build
withgo1.20.7 build
and everything returned to normal.Environment details (OS, Microsoft Excel™ version, physical, etc.):
Ubuntu 22.04
LibreOffice 7.3.7.2
Intel 9700K
The text was updated successfully, but these errors were encountered: