creek icon indicating copy to clipboard operation
creek copied to clipboard

Problems reading file created by AXLSX gem

Open agentGreg opened this issue 9 years ago • 5 comments

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

agentGreg avatar Apr 26 '17 21:04 agentGreg

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).

budget_version_2_after.xlsx budget_version_2_before.xlsx

gduprey avatar May 15 '17 22:05 gduprey

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>

thekendalmiller avatar May 18 '17 18:05 thekendalmiller

@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.

SGrondin avatar Jun 09 '17 14:06 SGrondin

PR #47 has been merged to master.

pythonicrubyist avatar Jun 14 '17 00:06 pythonicrubyist

Thank you @SGrondin for providing a fix!

Thanks @pythonicrubyist for merging this to master!

agentGreg avatar Jun 14 '17 10:06 agentGreg