You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Running the code at the README the generated spreadsheet cannot be open
package main
import (
"fmt"
"github.com/xuri/excelize/v2"
)
func main() {
f := excelize.NewFile()
defer func() {
if err := f.Close(); err != nil {
fmt.Println(err)
}
}()
// Create a new sheet.
index, err := f.NewSheet("Sheet2")
if err != nil {
fmt.Println(err)
return
}
// Set value of a cell.
f.SetCellValue("Sheet2", "A2", "Hello world.")
f.SetCellValue("Sheet1", "B2", 100)
// Set active sheet of the workbook.
f.SetActiveSheet(index)
// Save spreadsheet by the given path.
if err := f.SaveAs("Book1.xlsx"); err != nil {
fmt.Println(err)
}
}
Steps to reproduce the issue:
Add this code and run the program
Describe the results you received:
Empty spreadsheet and with errors (according to microsoft excell)
Describe the results you expected:
Generated spreadsheet
Output of go version:
go version go1.21.0
Excelize version or commit ID:
v2.8.1
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS
The text was updated successfully, but these errors were encountered:
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, #1686, #1734, #1752, #1764, #1768, #1774 and #1840. 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.14 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.
Description
Running the code at the README the generated spreadsheet cannot be open
Steps to reproduce the issue:
Describe the results you received:
Empty spreadsheet and with errors (according to microsoft excell)
Describe the results you expected:
Generated spreadsheet
Output of
go version
:go version go1.21.0
Excelize version or commit ID:
v2.8.1
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS
The text was updated successfully, but these errors were encountered: