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
Corrupted file with AlternateContent #1196
Comments
Thanks for your issue. I have fixed this issue. Please try upgrade to the master branch code. |
You're a hero @xuri ! |
Hi Xuri, we are using Excelize to edit Third Party spreadsheets and this is working for the example above, but with the latest commit some other ones are breaking - release 2.5.0 was working for all of them. I'll narrow down an example of something in these spreadsheets that is causing the file to be corrupted when opened/written by Excelize. |
Hi Xuri if we take the original file button.xlsx, and open/write the file with Excelize it works. However, if we take this original file and Protect the Workbook button_locked.xlsx (password: Test) and open/write it with the master branch 26174a2 of Excelize it will be corrupted button_locked_latest.xlsx, in the released 2.5.0 version this does happen button_locked_2.5.0.xlsx. There is an AlternateContent section in xl/workbook.xml. This remains in the master branch excelize, and is removed in the release version. This section is below:
It's interesting that deleting the AlternateContent section hasn't had any noticeable impacts. Thanks again, |
Thanks for your feedback. This issue was caused by incorrect fields order in the workbook, and I have fixed it. Please upgrade to the master branch code again. |
Awesome, tested it out. It's now working for all the spreadsheets we're editing. Thanks again |
…rmula function ref qax-os#65, new formula functions: TINV and TTEST
… formula function - New formula functions: MODE and T.TEST
…rmula function ref qax-os#65, new formula functions: TINV and TTEST
… formula function - New formula functions: MODE and T.TEST
…rmula function ref qax-os#65, new formula functions: TINV and TTEST
… formula function - New formula functions: MODE and T.TEST
Hi there,
I have a file with an AlternateContent section in the worksheet XML, which is related to a Developer button.
When this is opened/written to a file (without making any changes) by Excelize commit d9b5afc, it cannot be opened by Excel (v16.59, macOS 12.1) (button_d9b5afc1ac4e.xlsx).
However, when doing the same thing with the Excelize released version (2.5.0) the file is not corrupted, and opens fine (button_2.5.0.xlsx).
When comparing the 2 outputted files XML worksheets the only difference is the file created using d9b5afc commit has the AlternateContent section preserved at the end of the file.
The original file (button.xlsx) has the AlternateContent section midway through.
Sounds like what was implemented in this commit f0cb29c
See the AlternateContent XML section below:
<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <mc:Choice Requires="x14"> <controls> <mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <mc:Choice Requires="x14"> <control shapeId="1025" r:id="rId4" name="Button 1"> <controlPr defaultSize="0" print="0" autoFill="0" autoPict="0"> <anchor moveWithCells="1" sizeWithCells="1"> <from> <xdr:col>0</xdr:col> <xdr:colOff>635000</xdr:colOff> <xdr:row>0</xdr:row> <xdr:rowOff>25400</xdr:rowOff> </from> <to> <xdr:col>2</xdr:col> <xdr:colOff>12700</xdr:colOff> <xdr:row>0</xdr:row> <xdr:rowOff>215900</xdr:rowOff> </to> </anchor> </controlPr> </control> </mc:Choice> </mc:AlternateContent> </controls> </mc:Choice> </mc:AlternateContent>
Thanks in advance for your help, hopefully this can be fixed so we can make use of some of the new features implemented.
Cheers,
Jackson
The text was updated successfully, but these errors were encountered: