XlsxReaderWriter
XlsxReaderWriter copied to clipboard
Excel File Open Error
Saved the excel successfully, When add the follow codes,the generated excel file can't opened. if not edit the cell,it's OK.
worksheet.cell(forCellReference: "A1", shouldCreate: true).setStringValue("xxxx")

Any luck with this?? I am able to read contents of cell from worksheet but i am not able to write it to a xlsx file :( I am stuck here. Help needed
@SNanjappa I actually got it to work in my Fork. It's in Beta, but I would like to have user testing it. https://github.com/charlymr/XlsxReaderWriter/tree/2.4.0.Beta.3
@charlymr i followed your instructions, it didn't work. it always spilt out the following error message
[!] Unable to find a specification for `SSZipArchive (~> 2.1)` depended upon by `XlsxReaderWriter`
however, if i add the following to my Podfile
then it works
pod 'SSZipArchive', '~> 2.1'
thanks for @renebigot's and your great work
@vinceplusplus I think this is because my pod specs are looking for SSZipArchive in the wrong cocoapods specs repo.
I'll double check that, but yes adding SSZipArchive like you did should sort the issue. Thanks for pointing it out.
I will eventually rename the repo and push it to the Master Cocoapods Specs so that discovery is easier.
Thanks for your Fork @charlymr
I tried 2.4.0.Beta.3 but the problem still exists for me.
Can you give me some hints what you think the problem is / which part of the code might be the problem / how we can debug it.
Then I would also have a look at the code and maybe can contribute a fix.
Interesting: Numbers, Dropbox Preview can open the Xlsx File without problems.
I do have the same issue at the moment. I will try the mentioned fork and deliver feedback on that...
There is a beta release that fixes this problem. (At least for a couple of people) https://github.com/charlymr/XlsxReaderWriter/tree/2.4.0.Beta.4
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.
@Captgrom i am also facing same issue. my xlsx file is not opening. how can i move xr to previous position?
@Captgrom i am also facing same issue. my xlsx file is not opening. how can i move xr to previous position?
No idea. I edit my xlsx files manually now.
@charlymr Have you fixed xlxs open file issue. i can't find your 2.4 beta wheree you have fixed this issue.
@jzafar For some reason the hyperlink does not work as expected. Try copying the link into the browser. The branch still exists.
This is a link to the corresponding issue on the other fork https://github.com/charlymr/XlsxReaderWriter/issues/7
If you want to fix the "XlsxReaderWriter" 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" ],