Clojure excel interaction (formulas)

I am looking for a clojure library that can read and write easily in order to succeed with the following functions:

  • must be compatible with .xlsx
  • reading: you need to be able to evaluate the formula before returning the value
  • writing: you need to easily add lines to the end of the sheet.
  • (optional) cell formatting: bold, selection, center alignment, etc.

I checked clojars and tried to use incanter-excel, which seems to be able to do all this, but it uses a lot of unnecessary things, such as reading into Dataset type and graphical interfaces. I would prefer something that just uses its own structures in clojure (lists, vectors, etc.), because I really just take a bunch of lines that I pull from different places and throw them into cells (each line will have same number of fields).

(ns incanterTest.core) (use '(incanter core excel)) (let [data (read-xls "test.xlsx")] (type data) (view data)) 

test.xlsx:

 nm n+m 1 2 3 <- =A2+B2 10 20 30 <- =A3+B3 

I would like to use clojure -esque syntax, but maybe using APACHE POI directly is easiest? Thank you for your help.

+4
source share
3 answers

Discard the docjure from Martin Julia. Not quite sure what you mean by your second bullet.

+3
source

Probably not what you want, but cool ... eh ... evil nonetheless: spreadmap .

+2
source

Another way is to check out http://github.com/tuddman/clj-dde which can read and write in excel easily

can also use dynamic "listeners" on any cell (s) if you want to read the results from the above formulas.

+1
source

Source: https://habr.com/ru/post/1490360/


All Articles