Skip to content

Instantly share code, notes, and snippets.

@ansonhoyt
ansonhoyt / excelToJson.rb
Created Mar 1, 2012
Convert Excel of Arbitrary Tasks to JSON
View excelToJson.rb
#!/usr/bin/env ruby
# Reads an Excel and writes as JSON
# - Assumes header row containing field names, first sheet is read
# - Keeps null values
#
# TODO:
# - accept filename and read based on extension (xlsx, xls, csv).
# - output actual JSON.
# - clean up.