-
Notifications
You must be signed in to change notification settings - Fork 256
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
Error recovery when opening MS Excel: #401
Comments
I am also having this issue. I'm not even modifying the sheet, just reading it in and saving it to file without any changes:
|
idk about @kyalpani, but I'm guessing my issue is related to #198. @weshatheleopard Thanks for maintaining a gem that can do both reading + writing for xlsx 😄 |
I will be glad to help you locate the problem. If there is specific information that you require, I can try to locate it. #198 is certainly related but reopening the excel was not an option in my case. Nonetheless, at least for Excels generated from scratch, RubyXL is an excellent tool. |
u can show us a file in question? |
i think u have a path trouble.. try again with path="/tmp" (dont forget to upload file in there) |
Hi, using rubyXL, I am transforming an existing MS-Excel into a new one... When I open the new one, MS-Excel reports an error and tries to fix the errors...
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Removed Records: Named range from /xl/workbook.xml part (Workbook)
Repaired Records: Cell information from /xl/worksheets/sheet7.xml part
The result of the recovery is stored in the file with the following content
I unzipped the contents of the original and transformed Excels and compared them (in meld), specifically I compared workbook.xml in both versions and I can see that under the
<sheets>
tag all "r:id" values are off by 5, i.e. if a sheet in the original version has r:id=X then in the transformed version it has r:id=(X + 5). I checked the rubyXL code and see that in ./lib/rubyXL/objects/relationships.rb:40 says:id => "rId#{relationships.size + 1}"
and wonder how it could go wrong... obviously when writing out the file somehow
apriori
relationships.size == 5
but I do not understand why? Do you have any idea?
Thanks.
The text was updated successfully, but these errors were encountered: