Skip to content
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

Saving excel file makes it corrupt #426

Closed
RajatBanerjee opened this issue Jun 15, 2019 · 10 comments
Closed

Saving excel file makes it corrupt #426

RajatBanerjee opened this issue Jun 15, 2019 · 10 comments
Labels
needs more info This issue can't reproduce, need more info

Comments

@RajatBanerjee
Copy link

Description
If you try to open and save an excel file, which has formatterd\colored\cell borders, it corrupts the file
xlsx, err := excelize.OpenFile("./Book1.xlsx")
if err != nil {
fmt.Println(err)
return
}
err = xlsx.Save()
if err != nil {
fmt.Println("unable to save Internal timesheet, error: ", err)
os.Exit(1)
}
Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Output of go version:

go version go1.12.5 darwin/amd64

Excelize version or commit ID:

github.com/360EntSecGroup-Skylar/excelize/v2 v2.0.1-0.20190601073747-d038ca2e9c75

Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OS
Excel for mac 16.13

@xuri
Copy link
Member

xuri commented Jun 15, 2019

Hi @RajatBanerjee, thanks for your feedback, could you upload the .xlsx attachment?

@RajatBanerjee
Copy link
Author

I can't upload the actual attachment since it has some confidential data, but it happens for any excel file, so let me recreate the scenario with a regular file and upload that.

@xuri xuri added the needs more info This issue can't reproduce, need more info label Jul 28, 2019
@dennisfleischmann
Copy link

@RajatBanerjee Hi RajatBanerjee, is the problem still there? We have issues while doing a small change in our excel (xlms) sheet using intensly activex controls and macros. The exel activeX control informations are lost afterwards.

@xuri
Copy link
Member

xuri commented Nov 26, 2019

Hi @dennisfleischmann, please provide code and file attachment to reproduce this issue if you can.

@muhrifqii
Copy link

I had the exact same problem too. Opened excel with formatterd\colored\cell borders, and also formulas that referenced across sheets

@xuri
Copy link
Member

xuri commented Dec 15, 2019

@muhrifqii could you provide code and file attachment to reproduce this issue?

@muhrifqii
Copy link

muhrifqii commented Dec 15, 2019

@xuri the code just open the file then save it, exactly like @RajatBanerjee code . It contains some credential data, could you please send your contact to me and I'll send it to you privately.

@xuri
Copy link
Member

xuri commented Dec 15, 2019

You can send me the file with credential data masking. xuri.me[at]gmail.com

@xuri xuri closed this as completed in a526e90 Dec 16, 2019
@xuri
Copy link
Member

xuri commented Dec 16, 2019

Hi @muhrifqii, thanks for your feedback. I have fixed it. Please try to upgrade the library with the master branch code. I'm not sure if this fix will work for the issue you mentioned by @RajatBanerjee.

@muhrifqii
Copy link

Thanks @xuri I tested on master branch and it fixed the issue

nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue can't reproduce, need more info
Projects
None yet
Development

No branches or pull requests

4 participants