Worksheet files: a four-line preamble (annotations, types, styles, headers) followed by one line per worksheet row.
A parsed worksheet: {:name "Accounts" :columns [{:header "amount" :type "number" :annotation [{:kind :directive :text "pebblestream:fail"} {:kind :comment :text "Stops the run ..."}] :style nil}] ; or the line 3 style map :rows [[{:kind :text :text "1"} {:kind :formula :text "=C2<=0"} ...]]}
An empty cell is {:kind :text :text ""}. Values stay text: interpreting them by column type is left to the consumer.
Worksheet files: a four-line preamble (annotations, types, styles, headers)
followed by one line per worksheet row.
A parsed worksheet:
{:name "Accounts"
:columns [{:header "amount" :type "number"
:annotation [{:kind :directive :text "pebblestream:fail"}
{:kind :comment :text "Stops the run ..."}]
:style nil}] ; or the line 3 style map
:rows [[{:kind :text :text "1"} {:kind :formula :text "=C2<=0"} ...]]}
An empty cell is {:kind :text :text ""}. Values stay text: interpreting them
by column type is left to the consumer.(annotation-lines text)Splits annotation text into directive and comment lines, keeping order.
Splits annotation text into directive and comment lines, keeping order.
(parse file-name text)(parse file-name text {:keys [legacy?]})Parses a worksheet file. Returns {:sheet parsed :errors [...]}; :sheet is nil when the file cannot be read far enough to build one. Pass {:legacy? true} for a version 1.0 archive.
Parses a worksheet file. Returns {:sheet parsed :errors [...]}; :sheet is nil
when the file cannot be read far enough to build one. Pass {:legacy? true}
for a version 1.0 archive.(write {:keys [columns rows]})Writes a parsed worksheet back to file text.
Writes a parsed worksheet back to file text.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |