roo-rb / roo-xls

Roo::Xls add support for legacy Excel file standards to Roo.
MIT License
82 stars 82 forks source link

Text cells are returned as numbers #46

Closed paneq closed 6 years ago

paneq commented 6 years ago

When I generate a file with a column containing ISBN numbers and format this columns/cells to be of type "text", after reading with roo-xls, the data comes as Float instead of String.

{:isbn=>9781609731939.0, :quantity=>10.0}

screenshot 2018-05-22 10 32 29

tgturner commented 6 years ago

@paneq Unfortunately, according to this thread https://github.com/zdavatz/spreadsheet/issues/41#issuecomment-132725639 there is not currently a way to do this properly with XLS files. I would recommend using XLSX if possible, or forcing the data to a string if you know its suppose to be a string.