-
Notifications
You must be signed in to change notification settings - Fork 696
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
Repair warnings from Excel #1
Comments
Hi Tim, Thanks for your excellent report. Excel will add a considerable amount of excel specific information when you open an Office Open XML spreadsheet as well as move all of your string data into a shared string xml, so the extra files, etc are normal. However having the cell data repaired is not. Looking at the error message "Repaired Records: Cell information from /xl/worksheets/sheet1.xml" my first hunch is that the value used to represent the date in cell C2 or the column width specifications need to rounded, or Excel 2011 requires the mc and x14ac namespaces. I've pushed a patch do the rounding and add the namespaces sans the 'Ignorable' attribute as it is not part of the ECMA standard and will break validation. However, I wont be able to confirm if this fixes the warning until I get 2011 installed on my mac. |
Hi Tim, Turns out it is a problem with the zip library I was using to get Unicode support. Switching the gem dependency back to rubyzip resolves repair warning but unfortunately breaks support for Japanese/Chinese/Korean text in the workbook. Ill be contacting the maintainers of rubyzip to see if they can help out. |
force binary encoding for zip entries. [bug] fixed error in app.rb so extended properties can now be used. improved support for OOXML cell element types.
Thanks a million Tim for pointing this out. Fix has been pushed and released in 1.0.12 |
When creating a spreadsheet with this gem, I get a repair warning from Excel for Mac 2011, Version 14.1.3 (110805),
the same that you get when you have a corrupted xlsx document. Here is the repair log from Excel:
The repaired document appears to have all the correct data, though.
Here is a diff of the two sheet1.xml files pre and post repair follows:
Files example1/xl/workbook.xml and example1-repaired/xl/workbook.xml differ significantly:
Additionally, Excel adds a few files:
Only in example1-repaired/docProps: core0.xml
Only in example1-repaired/xl: sharedStrings.xml
Only in example1-repaired/xl: theme
Any ideas on what's up and how we can get rid of the warning?
I'm on OS X Lion, with the default libxml (not libxml2 via homebrew) and in a gemset using the gems outlined in the axlsx gem's Gemfile. I also am using ruby-1.9.3-p0 but encountered the same issues under ree-1.8.7-2011.03
Here are the files I tested:
The text was updated successfully, but these errors were encountered: