Ruby gem to generate valid Excel files for case import

Hi,

Does anyone know of a Ruby Gem that can generate .xls that work for case
import ?

I’ve tried: spreadsheet, axlsx

Thanks

I managed to make it work with the Spreadsheet gem by opening an empty file
created with Excel as a base. If I write data to it and save it, I can
import the data to CommCare.

Cheers,

··· On Tuesday, September 27, 2016 at 5:55:38 PM UTC, Guillaume Deflaux wrote: > > Hi, > > Does anyone know of a Ruby Gem that can generate .xls that work for case > import ? > > I've tried: spreadsheet, axlsx > > Thanks >

Hi,

Actually method previously mentioned fails at the last step of the case
import wizard. There is some issue with date formats. CC Support told me
that XML-based XLS files were not supported.

I found a workaround generating a CSV file later converted to Excel using
the ‘ssconvert’ command line tool part of the Gnumeric package. This tool
supports a wide range of Excel formats (95, 2004, 2007, and more). This is
basically what is needed because all the Gems I found use XML-based formats.

ssconvert --export-type=Gnumeric_Excel:excel_biff8 source.csv destination.
xls

You can use ssconvert --list-exporters and ssconvert --list-importers
to see supports formats.

··· On Tuesday, September 27, 2016 at 6:19:43 PM UTC, Guillaume Deflaux wrote: > > I managed to make it work with the Spreadsheet gem by opening an empty > file created with Excel as a base. If I write data to it and save it, I can > import the data to CommCare. > > Cheers, > > On Tuesday, September 27, 2016 at 5:55:38 PM UTC, Guillaume Deflaux wrote: >> >> Hi, >> >> Does anyone know of a Ruby Gem that can generate .xls that work for case >> import ? >> >> I've tried: spreadsheet, axlsx >> >> Thanks >> >