-
-
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
Output file error after formula manipulation #346
Comments
Hi @ArmandoZepeda, thanks for your issue. I have fixed the issue corrupted xlsx after deleting formula of cell. However, when using Since that which will affect changes in references such as formulas, charts, and so on. If there is any referenced value of the worksheet, it will cause a file error when you open it. The excelize only partially updates these references currently. I think that solving this problem requires the completion of the function adjustHelper. I'll certainly accept that patch if somebody did that. |
Thanks for your fixing. Now the output file has no errors when formula is removed from cell. |
Thank you for your work on excelize. This is a really helpful and flexible tool.
I found an issue when an existing formula on the input file is deleted from the cell or moved down when new rows are added.
The error messages are the same to #152
Scenario description
Input file structure
It would be so helpful if some day this rebuild could be automatic(like Microsoft Excel editor does)
Excelize steps
To apply final formulas result, I need to perform the following:
Issue
Input file info:
Formula deletion:
xlsx, _ := excelize.OpenFile("./HistoryTemplate.xlsx")
sheetName := "Paros"
xlsx.SetCellFormula(sheetName, "E14", "")
xlsx.SaveAs("./output1.xlsx")
Formula moved down:
xlsx, _ := excelize.OpenFile("./HistoryTemplate.xlsx")
sheetName := "Paros"
xlsx.DuplicateRowTo(sheetName, 10, 11)
xlsx.SaveAs("./output2.xlsx")
Error message to open output file:
"Removed Records: Formula from /xl/calcChain.xml part (Calculation properties)"
Files:
HistoryTemplate.xlsx
output1.xlsx
output2.xlsx
go env:
set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Mind\AppData\Local\go-build set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\GO_Projects set GORACE= set GOROOT=C:\Go set GOTMPDIR= set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc 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 set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Mind\AppData\Local\Temp\go-build976948498=/tmp/go-build -gno-record-gcc-switches
The text was updated successfully, but these errors were encountered: