Open tombooth opened 7 years ago
Hi Tom,
thanks for writing this. What are the things you consider "less than ideal"?
Would it look better, if we rethought the API for a more fluent compositional style instead of staying close to the V1 API?
The fonts and styles are not the highest priority, but I think they can be rewritten in a better style with the new API by e.g. assigning a name (e.g. :headline
) when creating them. This could be stored in the Clojure state map and the the symbolic name could then be used to access them when they are applied.
On a further note, I think we could provide sensible defaults to the functions, for example, the -seq
functions would not need to require more than a workbook. We could have a cursor concept and set it to default to the first cell of the first row of the first sheet: :cursor {:row 1, :cell :a, :sheet "Sheet1"}
and then se that as a reference: row-seq
would then enumerate the rows of the current sheet selected by the :cursor :sheet
(navigating there in the POI instance as needed) so we would not need all the assert about where we are etc.
PS: please submit pull requests for this against the v2 branch, not the master.
I've thrown together a little something that tests a couple of cases. Please comment on this, definitely less than ideal!
58