Skip to content

Instantly share code, notes, and snippets.

@stevetarver
stevetarver / xlsxToJson.coffee
Last active August 29, 2015 02:18
Convert Excel xlsx spreadsheet to JSON list of objects, allowing dotted strings as keys to imply nested objects.
###
Create a list of json objects; 1 object per excel sheet row
Assume: Excel spreadsheet is a square of data, where the first row is
object keys and remaining rows are object values and the desired json
is a list of objects.
Dotted notation: Key row (0) containing firstName, lastName, address.street,
address.city, address.state, address.zip would produce, per row, a doc with
first and last names and an embedded doc named address, with the address.