excelize: Corrupted xlsx after write operation
Thank you for your great work on excelize. Reading works like a charm. But I have an issue with writing.
I update one cell, save and XLSX file is corrupted.
Input file: source_file.xlsx Output corrupted file: Workbook.xlsx
How I am writing to the file
xlsx, err := excelize.OpenFile(path)
xlsx.SetCellInt("Sheet1", "I15", 100)
err := xlsx.SaveAs("./Workbook.xlsx")
Erro message during opening Workbook.xlsx
And error if I try to recover the workbook: Replaced Part: /xl/worksheets/sheet1.xml part with XML error. Load error. Line 2, column 213397. Removed Records: Formula from /xl/calcChain.xml part (Calculation properties)
go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\stanislav.valasek\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (5 by maintainers)
Commits related to this issue
- Bugfix: corrupted xlsx after write operation, relate issue #152. Signed-off-by: Ri Xu <xuri.me@gmail.com> — committed to qax-os/excelize by xuri 7 years ago
- Add missing XML attributes `customWorkbookViews` and `customWorkbookView` in the workbook, relate issue #152. Signed-off-by: Ri Xu <xuri.me@gmail.com> — committed to qax-os/excelize by xuri 7 years ago
@ntttrang please reference issue #488.