Problems reading file created by AXLSX gem
In my app, the data is pulled from various sources and stored in the form of Excel file created by AXLSX gem.
It seems that creek has problems reading this data file. After opening in Excel and saving, all works fine.
Do you have any hint what is wrong and how can I make the file readable without going throgh Excel save step?
Please find attached the example file that has troubles being read by creek: failing_creek_read.xlsx
Gah! Just ran into the same problem -- exporting data for a user using AXLSX and then importing it after they make changes using Creek. If I just export and attempt to import (without opening in any spreadsheet tool), nearly all "text" cells are 'nil' and only integer/decimal fields have values.
If I open in in LibreOffice (looks fine) and just "Save As" (no changes), Creek reads the "Save As" version fine.
I'm also attaching a relatively short XLSX generated by AXLSX (called budget_version_2_before) and after opening it in LibreOffice and just doign a Save As (called budget_version_2_after).
Looking at sheet1.xml in failing_creed_read.xlsx, this looks to be a duplicate of https://github.com/pythonicrubyist/creek/issues/37
The generated file is using cell type inlineStr, for example
<c r="A1" s="0" t="inlineStr"><is><t>HS8</t></is></c>
@matfiz @gduprey @thekendalmiller This should be fixed in my fork at https://github.com/partpilotllc/creek Just add this line to your Gemfile:
gem 'creek', '2.0.1-partpilot', :git => "https://github.com/PartPilotLLC/creek.git", :tag => "v2.0.1-partpilot"
There's also a PR for it (https://github.com/pythonicrubyist/creek/pull/47), but I have no idea when/if it'll be merged.
PR #47 has been merged to master.
Thank you @SGrondin for providing a fix!
Thanks @pythonicrubyist for merging this to master!