Closed matthewdowney closed 4 years ago
Tagging those who have previously commented or opened issues: @orolle @luposlip @PlumpMath @orestis
Hello @matthewdowney !
I recently used the 2.0.0 SNAPSHOT for a huge project where I had to manipulate date to create hundreds of sheets in a workbook. The data was tabular (I only used table-grid
), but I also had to color / style rows and columns based on various properties.
I loved working with this library and it made my life very easy. Thank you for the work you have put into it.
One feedback I have: There is no way to control the order of columns in a sheet. I ended up looking through the code and then carefully naming all my columns in sorted order so that they would show up in the correct format.
It would be great if the -grid
functions could be extended to allow passing in an explicit order.
Hey @vedang, thanks for your feedback! (And for the reminder that's it's probably about time to release v2.) This is something that you can in fact do with the two-arity version of table-grid
, e.g.
(table-grid ["First Column" "Second Column" "Third Column"] my-data)
Does this work for you, or are you looking for something else?
P.S. I'm realizing that no second arity exists for tree-grid
, so I'm going to add that before releasing.
Yes, this is pretty much exactly what I need. I have no idea why my brain skipped this completely. Thank you!
Great to hear, you're welcome!
Version 2 is now released :tada:
Hello everybody,
My working prototype of version 2 is just about ready to go and I wanted to take this chance to collect feedback. I mostly use this library at work, and version 2 is certainly a huge improvement for my needs, but I want to try to accommodate anybody else using this library.
The big changes are improving performance and un-complicating the styling and data representation of cells.
Trying it out
Version 2 is available on the
develop
branch along with a fully updated readme (https://github.com/matthewdowney/excel-clj/tree/develop). It is also on Clojars.If anybody has feedback on the design, finds things that are not backwards compatible that they wish were, or otherwise wants to contribute to shaping the eventual version 2, feel free to comment in this thread, open issues, or submit pull requests. I'm probably going to leave this open for a couple of weeks, and if there's no feedback at that point, merge v2 as-is.
Changes
Writer
-style abstraction that the rest of the framework uses — by setting it in streaming mode (the new default), the performance of writing large spreadsheets (100k rows or more) increases by an order of magnitude.transpose
andjuxtapose
helpers to transpose grids & stick them side by side, respectively. (Sticking them together vertically can be done withconcat
orinto
.)Table formatting is easier. The old
table
function is replaced bytable-grid
, which produces a grid of[[cell]]
. Tables are[column->value]
, andtable-grid
respects any values or whole rows that are embellished with viacell.clj
. E.g.:This makes it easier to style and format tables, since it doesn't have to be done in the constructor for
table
anymore.instead of
tree
andtable
are replaced bytree-grid
andtable-grid
, the old functions continue to work (andtree
still works with the old tree format).write!
, there is anappend!
function which replaces only specific sheets within a preexisting workbook and writes the result to a new file. This can be used for some kinds of templates, where the entire template lives in one sheet and uses formulas to pull in raw data from the sheet thatappend!
replaces.Best, Matt