Skip to content

Saving excel file makes it corrupt #426

@RajatBanerjee

Description

@RajatBanerjee

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

Activity

xuri

xuri commented on Jun 15, 2019

@xuri
Member

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

RajatBanerjee

RajatBanerjee commented on Jun 15, 2019

@RajatBanerjee
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.

dennisfleischmann

dennisfleischmann commented on Nov 26, 2019

@dennisfleischmann

@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

xuri commented on Nov 26, 2019

@xuri
Member

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

muhrifqii

muhrifqii commented on Dec 15, 2019

@muhrifqii

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

xuri

xuri commented on Dec 15, 2019

@xuri
Member

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

muhrifqii

muhrifqii commented on Dec 15, 2019

@muhrifqii

@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

xuri commented on Dec 15, 2019

@xuri
Member

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

xuri

xuri commented on Dec 16, 2019

@xuri
Member

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

muhrifqii commented on Dec 19, 2019

@muhrifqii

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

added a commit that references this issue on Oct 23, 2020
a56fa85
added a commit that references this issue on Mar 14, 2024
a526e90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoThis issue can't reproduce, need more info

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xuri@RajatBanerjee@muhrifqii@dennisfleischmann

        Issue actions

          Saving excel file makes it corrupt · Issue #426 · qax-os/excelize