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
Opening the file linked below and saving it directly corrupts it. Opening it in Excel then removes all styles
Steps to reproduce the issue:
Read the file and save it as a new one
The new file is broken
package main
import (
"github.com/xuri/excelize/v2"
)
// in the main, we just open a file and save it
// to see if it corrupts it
func main() {
f, err := excelize.OpenFile("WorkingFile.xlsx")
if err != nil {
panic(err)
}
if err := f.SaveAs("BreakingFile.xlsx"); err != nil {
panic(err)
}
}
Describe the results you received:
Excel must repair the file, removing all styles. From the error message the error is on /xl/styles.xml (HRESULT 0x8000ffff Line 2, Col 0)
Describe the results you expected:
The same document, +- some size differences due to different XML formatting.
Output of go version:
go version go1.21.3 darwin/amd64
Excelize version or commit ID:
github.com/xuri/excelize/v2 v2.8.0
Environment details (OS, Microsoft Excel™ version, physical, etc.):
On a Macbook Pro Intel. Using Excel Online for my tests but apparently the same with Excel running on Windows.
The text was updated successfully, but these errors were encountered:
Thanks for your issue. This issue similar with #1653 and #1693, and already has been fixed, please upgrade to the master branch by go get -u github.com/xuri/excelize/v2@master, and this patch will be released in the next version.
Description
Opening the file linked below and saving it directly corrupts it. Opening it in Excel then removes all styles
Steps to reproduce the issue:
WorkingFile.xlsx
BreakingFile.xlsx
Describe the results you received:
Excel must repair the file, removing all styles. From the error message the error is on
/xl/styles.xml (HRESULT 0x8000ffff Line 2, Col 0)
Describe the results you expected:
The same document, +- some size differences due to different XML formatting.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
On a Macbook Pro Intel. Using Excel Online for my tests but apparently the same with Excel running on Windows.
The text was updated successfully, but these errors were encountered: