You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to provide a complete reader, I needed this function. Maybe you'll want to use it in docjure, or write a similar one (note that I made keywords, but that's not exactly required):
(defn process-workbook [#^Workbook wb]
"Returns a vector with maps for each sheet (a name and a vector with maps for each row, in the form [{:a1 valA1, :c2 valC2, ...}, ...]."
(vec
(for [sheet (sheet-seq wb)]
(hash-map :name (sheet-name sheet)
:rows (let [rows (vec
(for [row (into-seq sheet)]
(map read-cell row)))
headers (map keyword (first rows))
data (rest rows)]
(map #(zipmap headers %) data))))))
The text was updated successfully, but these errors were encountered:
In order to provide a complete reader, I needed this function. Maybe you'll want to use it in docjure, or write a similar one (note that I made keywords, but that's not exactly required):
The text was updated successfully, but these errors were encountered: