Open songxing10000 opened 7 years ago
The solution is in this post: https://github.com/renebigot/XlsxReaderWriter/issues/95
"I found that this error occurs due to wrong position of XR tag in the xl/workbook.xml file. It is moved from original position. Simply move it to the previous position and the problem disappear."
The tags is: "<xr:revisionPtr", if you want to fix the excel file, move this tags from last of file to before "
And if you want to fix the Excel Library, add << @"xr:revisionPtr" >> tag in "NSDictionary+OpenXmlString.m" File. You must to add in "openXmlOrderedKeys" NSDictionary. Like this:
@"workbook": @[ @"xmlns", @"xmlns:r", @"fileVersion", @"fileSharing", @"workbookPr", @"workbookProtection", @"mc:AlternateContent", @"xr:revisionPtr", @"bookViews", @"sheets", @"functionGroups", @"externalReferences", @"definedNames", @"calcPr", @"oleSize", @"customWorkbookViews", @"pivotCaches", @"smartTagPr", @"smartTagTypes", @"webPublishing", @"fileRecoveryPr", @"webPublishObjects", @"extLst" ],
when I save the worksheets by code [spreadsheet save]; it can save ,but when open the xlsx file ,it say that the file broken