This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-28
Channels
- # announcements (11)
- # aws (2)
- # babashka (35)
- # beginners (173)
- # calva (3)
- # chlorine-clover (2)
- # cider (17)
- # clara (2)
- # clj-kondo (28)
- # cljs-dev (11)
- # cljsrn (53)
- # clojure (178)
- # clojure-argentina (1)
- # clojure-europe (12)
- # clojure-germany (5)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-spec (25)
- # clojure-uk (88)
- # clojurescript (109)
- # conjure (34)
- # cursive (2)
- # data-science (35)
- # datomic (15)
- # emacs (6)
- # events (1)
- # fulcro (28)
- # graphql (15)
- # helix (21)
- # hoplon (7)
- # jobs (4)
- # jobs-discuss (1)
- # joker (15)
- # lambdaisland (1)
- # lein-figwheel (4)
- # local-first-clojure (1)
- # malli (8)
- # meander (17)
- # off-topic (33)
- # parinfer (2)
- # rdf (16)
- # re-frame (3)
- # reagent (21)
- # reitit (14)
- # remote-jobs (5)
- # ring (8)
- # rum (1)
- # shadow-cljs (184)
- # sql (2)
- # testing (1)
- # tools-deps (23)
morning
it is pretty good for creating lots of static png files to put into reports and excel sheets
(fn [[sheet-name img]]
(try
(let [ ;; int pictureIdx = wb.addPicture(bytes, Workbook.PICTURE_TYPE_JPEG);
pic-idx (.addPicture wb img Workbook/PICTURE_TYPE_PNG)
sheet (xl/select-sheet sheet-name wb)
helper (.getCreationHelper wb)
drawing (.createDrawingPatriarch sheet)
anchor (.createClientAnchor helper)
_ (.setCol1 anchor 14)
_ (.setRow1 anchor 2)
;; Picture pict = drawing.createPicture(anchor, pictureIdx);
;; pict.resize();
pict (.createPicture drawing anchor pic-idx)]
(.resize pict))
(catch Exception e
(throw (ex-info (str "Failed to create sheet. " sheet-name) {:sheet-name sheet-name} e)))))
👍 4