Skip to content

Commit eaf6a6d

Browse files
committed
Update README for v2
1 parent fc34641 commit eaf6a6d

File tree

1 file changed

+26
-53
lines changed

1 file changed

+26
-53
lines changed

README.md

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -211,56 +211,29 @@ that includes optional style data / cell merging instructions.
211211

212212
![A spreadsheet with a merged title](resources/manual-grid.png)
213213

214-
## Roadmap
215-
216-
- Templates! There's no reason to do all of the styling work programmatically.
217-
We should be able to download [some cool Google Sheets template](https://docs.google.com/spreadsheets/u/0/?usp=mkt_sheets_tpl)
218-
as an `.xlsx` file, edit it to indicate where `excel-clj` should fill in tables,
219-
trees, or individual cells, and then write code that reads the template from a
220-
`resources/some-template.xlsx` and produces a filled in sheet.
221-
222-
Not at all a fully formed spec yet, but something along the lines of filling
223-
in the following sheet:
224-
225-
![Template draft](resources/template-draft.png)
226-
227-
Using some simple data:
228-
```clojure
229-
{:title "The Title"
230-
:start-date (Date. (- (System/currentTimeMillis) (* 1000 60 60 24 7)))
231-
:end-date (Date.)
232-
:employee-name "Foo"
233-
:employee-id "Bar"
234-
:manager-name "Baz"
235-
:department "Accounting"
236-
:expense-purpose "Trip"
237-
:tbl [{:date (Date.) :category "Cat A" :desc "Misc expenses"
238-
:notes "" :amount 500.00M}
239-
{:date (Date.) :category "Cat B" :desc "Other expenses"
240-
:notes "" :amount 100.00M}]}
241-
```
242-
243-
To get the following result:
244-
245-
![Filled in template draft](resources/filled-template-draft.png)
246-
247-
- Reading & editing existing spreadsheets. This should go hand in hand with
248-
template generation.
249-
250-
- Formulas! We don't have them. I'm envisioning a syntax where a table column
251-
or a cell contain a `:value` of `(excel/formula ...)`. The interior of the
252-
formula could allow relative coordinate generation with the placeholders `*x*`
253-
and `*y*` — which could be operated on to find relative coordinates (e.g.
254-
`(- *x* 2)`) — and would then be replaced during rendering with the column and
255-
row. E.g.
256-
257-
```clojure
258-
(def table-data
259-
[{"Foos" 10, "Bars" 5, "Total" (excel/formula "=(- *x* 2)*y* + (- *x* 1)*y*")}
260-
{"Foos" 12, "Bars" 8, "Total" (excel/formula "=(- *x* 2)*y* + (- *x* 1)*y*")}])
261-
```
262-
263-
would result in the formulas being rendered in the C column after the title
264-
row, the first being `=A1+B1` and the second being `=A2+B2`.
265-
266-
- Java wrapper? Uncertain if this would be useful / how it would look.
214+
## v2.0.0 Roadmap
215+
- A higher-level interface that allows wrapping side-effecting code in a `view`
216+
or a `write` macro to redirect any `clojure.pprint/print-table` effects into
217+
a spreadsheet.
218+
- Likewise, an improved `pprint` for trees that works under the same abstraction.
219+
- Sheet names can be specified via meta data.
220+
- Performance improvements. Right now, performance starts to break down after
221+
about 100,000 rows on my Ubuntu / OpenOffice setup, and much sooner on Mac.
222+
- Rework the lower-level interface to take full advantage of laziness, where
223+
possible.
224+
- Rethink the way formatting is handled.
225+
- Check if it ends up being more performant to write a chunk of the file, and
226+
then re-open it to write the next chunk. This will have to do with Apache
227+
POIs way of dealing with memory, so I'll have to investigate that first.
228+
- Templates which provide an easy way to work with formulas and styling. The
229+
planned functionality is simple: instead of overwriting a document, allow
230+
overwriting a single sheet within the document.
231+
- Then to create a template, you just make a .xlsx file, or download
232+
[some cool Google Sheets template](https://docs.google.com/spreadsheets/u/0/?usp=mkt_sheets_tpl),
233+
with multiple sheets.
234+
- Some of the sheets are _only_ source data, which we'll write to programatically,
235+
and other sheets depend on those source sheets (via formulas, macros, etc.).
236+
- Tentatively: a Java wrapper or some RPC interface for other languages to use
237+
the functionality of this library, maybe by passing in JSON tables / trees?
238+
Though "start-writing" and "stop-wrting" commands with lines of data in between
239+
might be more practical.

0 commit comments

Comments
 (0)