Liking cljdoc? Tell your friends :D

excel-clj.core

Utilities for declarative creation of Excel (.xlsx) spreadsheets, with higher level abstractions over Apache POI (https://poi.apache.org/).

The highest level data abstraction used to create excel spreadsheets is a tree, followed by a table, and finally the most basic abstraction is a grid.

The tree and table functions convert tree formatted or tabular data into a grid of [[cell]].

See the (comment) form with examples at the bottom of this namespace.

Utilities for declarative creation of Excel (.xlsx) spreadsheets,
with higher level abstractions over Apache POI (https://poi.apache.org/).

The highest level data abstraction used to create excel spreadsheets is a
tree, followed by a table, and finally the most basic abstraction is a grid.

The tree and table functions convert tree formatted or tabular data into a
grid of [[cell]].

See the (comment) form with examples at the bottom of this namespace.
raw docstring

append!clj

(append! workbook from-path path)
(append! workbook
         from-path
         path
         {:keys [streaming? auto-size-cols?] :or {streaming? true} :as ops})

Merge the workbook with the one saved at from-path, write it to the given path, and return a file object pointing at the written file.

The workbook is a key value collection of (sheet-name grid), either as map or an association list (if ordering is important).

The 'merge' logic overwrites sheets of the same name in the workbook at from-path, so this function is only capable of appending sheets to a workbook, not appending cells to a sheet.

Merge the `workbook` with the one saved at `from-path`, write it to the
given `path`, and return a file object pointing at the written file.

The workbook is a key value collection of (sheet-name grid), either as map or
an association list (if ordering is important).

The 'merge' logic overwrites sheets of the same name in the workbook at
`from-path`, so this function is only capable of appending sheets to a
workbook, not appending cells to a sheet.
sourceraw docstring

append-stream!clj

(append-stream! workbook from-stream stream)
(append-stream!
  workbook
  from-stream
  stream
  {:keys [streaming? auto-size-cols?] :or {streaming? true} :as ops})

Like append!, but for streams.

Like `append!`, but for streams.
sourceraw docstring

best-guess-cell-formatclj

(best-guess-cell-format val column-name)

Try to guess appropriate formatting based on column name and cell value.

Try to guess appropriate formatting based on column name and cell value.
sourceraw docstring

exampleclj

(example)
source

example-template-dataclj

source

example-workbook-dataclj

source

juxtaposeclj

(juxtapose left-grid right-grid)
(juxtapose left-grid right-grid padding)

Put grids side by side (whereas concat works vertically, this works horizontally).

Optionally, supply some number of blank padding columns between the two grids.

Finds the maximum row width in the left-most grid and pads all of its rows to that length before sticking them together.

Put grids side by side (whereas `concat` works vertically, this works
horizontally).

Optionally, supply some number of blank `padding` columns between the two
grids.

Finds the maximum row width in the left-most grid and pads all of its rows
to that length before sticking them together.
sourceraw docstring

quick-opencljdeprecated

Deprecated in favor of quick-open!.

Deprecated in favor of `quick-open!`.
sourceraw docstring

quick-open!clj

(quick-open! workbook)

Write a workbook to a temp file & open it. Useful for quick repl viewing.

Write a workbook to a temp file & open it. Useful for quick repl viewing.
sourceraw docstring

quick-open-pdf!clj

(quick-open-pdf! workbook)

Write a workbook to a temp file as a pdf & open it. Useful for quick repl viewing.

Write a workbook to a temp file as a pdf & open it. Useful for quick repl
viewing.
sourceraw docstring

tablecljdeprecated

Deprecated in favor of table-grid.

Deprecated in favor of `table-grid`.
sourceraw docstring

table-gridclj

(table-grid rows)
(table-grid ks rows)

Build a lazy sheet grid from rows.

Applies default styles to cells which are not already styled, but preserves any existing styles.

Additionally, expands any rows which are wrapped with style data to apply the style to each cell of the row. See the comment form below this function definition for examples.

This fn has the same shape as clojure.pprint/print-table.

Build a lazy sheet grid from `rows`.

Applies default styles to cells which are not already styled, but preserves
any existing styles.

Additionally, expands any rows which are wrapped with style data to apply the
style to each cell of the row. See the comment form below this function
definition for examples.

This fn has the same shape as clojure.pprint/print-table.
sourceraw docstring

transposeclj

(transpose grid)

Transpose a grid.

Transpose a grid.
sourceraw docstring

treecljdeprecated

Deprecated in favor of tree-grid.

Deprecated in favor of `tree-grid`.
sourceraw docstring

tree-gridclj

(tree-grid tree)
(tree-grid ks tree)

Build a lazy sheet grid from tree, whose leaves are shaped key->number.

E.g. (tree-grid {:assets {:cash {:usd 100 :eur 100}}})

See the comment form below this definition for examples.

Build a lazy sheet grid from `tree`, whose leaves are shaped key->number.

E.g. (tree-grid {:assets {:cash {:usd 100 :eur 100}}})

See the comment form below this definition for examples.
sourceraw docstring

with-titleclj

(with-title title [row & _ :as grid])

Prepend a centered title row to the grid with the same width as the first row of the grid.

Prepend a centered `title` row to the `grid` with the same width as the
first row of the grid.
sourceraw docstring

write!clj

(write! workbook path)
(write! workbook
        path
        {:keys [streaming? auto-size-cols?] :or {streaming? true} :as ops})

Write the workbook to the given path and return a file object pointing at the written file.

The workbook is a key value collection of (sheet-name grid), either as map or an association list (if ordering is important).

Write the `workbook` to the given `path` and return a file object pointing
at the written file.

The workbook is a key value collection of (sheet-name grid), either as map or
an association list (if ordering is important).
sourceraw docstring

write-pdf!clj

(write-pdf! workbook path)

Write the workbook to the given filename and return a file object pointing at the written file.

Requires OpenOffice. See https://github.com/sbraconnier/jodconverter.

The workbook is a key value collection of (sheet-name grid), either as map or an association list (if ordering is important).

Write the workbook to the given filename and return a file object pointing
at the written file.

Requires OpenOffice. See https://github.com/sbraconnier/jodconverter.

The workbook is a key value collection of (sheet-name grid), either as map or
an association list (if ordering is important).
sourceraw docstring

write-stream!clj

(write-stream! workbook stream)
(write-stream!
  workbook
  stream
  {:keys [streaming? auto-size-cols?] :or {streaming? true} :as ops})

Like write!, but for a stream.

Like `write!`, but for a stream.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close