Reads an entire sheet.
Added two functions to read a sheet and return contents as a clojure map. The map is a nested map. The outer map is keyed on row number and the inner map by column number.
At first I opted out of whole-spreadhseet reading. Now I don't see why.
However I'm not sure about the nested map representation.
What's your usecase?
I was converting a legacy spreadsheet based system to a web based system. There was a lot of legacy data to be imported. So I wrote a small app that lets the user import the spreadsheet - using spreadmap -, read the individual sheets and push data to the database.
I needed a way to tell that I had read all the data from a sheet. I didn't seem to be able to tell that from select-keys and .valAt, since a missing cell only returns a nil, which is also the case - unless I am mistaken - when I go past the end of the spreadsheet.
The nested map is not critical, returning a sequence of maps is fine too. I can change that. The reason I return nested maps (indexed by rows) was that certain rows in the spreadsheet contained metadata (such as field names, formulas etc..) which I did not need to import into the database.
Sid
From: Christophe Grand [email protected] To: cgrand/spreadmap [email protected] Cc: Sid Kurias [email protected] Sent: Monday, July 1, 2013 9:20 PM Subject: Re: [spreadmap] Reads an entire sheet. (#3)
At first I opted out of whole-spreadhseet reading. Now I don't see why. However I'm not sure about the nested map representation. What's your usecase? — Reply to this email directly or view it on GitHub.