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 #1257

Closed
admeen-vs opened this issue Jun 20, 2022 · 9 comments
Closed

Saving excel file makes it corrupt #1257

admeen-vs opened this issue Jun 20, 2022 · 9 comments
Labels
confirmed This issue can be reproduced

Comments

@admeen-vs
Copy link

Description of task
Here is the task that I need to solve: open an excel document template that contains comments and formulas; insert the new values into the places where the comments are (function used to change the values: SetCellValue); save the excel document under a new path and new name

As result
After opening the saved file an error occurs that the file is corrupted

go version:
go version go1.18.1 windows/amd64

exelize version:
github.com/xuri/excelize/v2 v2.6.0

excel version
Microsoft® Excel® LTSC MSO (16.0.14332.20296) 64-bit

win version
Windows 11 Pro 21H2 build 22000.675

excel template file in attachment
Z.xlsx

@xuri xuri added confirmed This issue can be reproduced in progress Working in progress labels Jun 21, 2022
@xuri xuri closed this as completed in 852f211 Jun 21, 2022
@xuri
Copy link
Member

xuri commented Jun 21, 2022

Thanks for your issue. I have fixed it, please upgrade to the master branch code, and this patch will be released in the next version. Note that the source spreadsheet Z.xlsx can't open on Excel 2007.

@xuri xuri removed the in progress Working in progress label Jun 21, 2022
@admeen-vs
Copy link
Author

thank you very much

@AhmedX6
Copy link

AhmedX6 commented Oct 3, 2022

@xuri I'm facing same issue.. opening an xlsx file and write on it some cell value then save makes it corrupt I'm on master branch up to date.. what's happening?

@xuri
Copy link
Member

xuri commented Oct 4, 2022

@AhmedX6 Thanks for your feedback. Could you provide your input file attachment without confidential info?

@AhmedX6
Copy link

AhmedX6 commented Oct 4, 2022

@xuri here it is : input.xlsx
just try an open with excelize then save and it gets corrupted

@xuri
Copy link
Member

xuri commented Oct 4, 2022

Hi @AhmedX6, I have tested based on the Excelize v2.6.1 and master branch code with your attachment, and it works well on Office 2007 and Excel for Mac 16.65. Which Excel version are you using? Can you show us a complete, standalone example program or reproducible demo?

@AhmedX6
Copy link

AhmedX6 commented Oct 4, 2022

I'm using : Microsoft® Excel® for Microsoft 365 MSO (Version 2209 Build 16.0.15629.20152) 64-bit
I think I'm on 2020+ or 2018+ but not less...

@xuri
Copy link
Member

xuri commented Oct 4, 2022

I have just test on Excel 2021 16.0.15629.20156 and it work well. Do you make sure using the master branch code? Can you show us a complete, standalone example program or reproducible demo?

@AhmedX6
Copy link

AhmedX6 commented Oct 4, 2022

image
I don't understand... It started to work now... when I retried.... omg

xuri added a commit to carbin-gun/excelize that referenced this issue Oct 9, 2022
xuri added a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
None yet
Development

No branches or pull requests

3 participants