Edit some excel-cells with clojure docjure -



Edit some excel-cells with clojure docjure -

i'm trying edit cells in excel sheet clojure docjure (https://github.com/mjul/docjure).

in documentation of docjure shown how create new spreadsheet don't want that. i'm trying read out info of excel sheet, calculate new values , write them specific cells of same sheet.

well first 2 steps working. don't know how write values back.

how can this?

it's useful take @ tests, can document code degree. found file looked relevant: https://github.com/mjul/docjure/blob/master/test/dk/ative/docjure/spreadsheet_test.clj#l126

and in file found:

(deftest set-cell!-test (let [sheet-name "sheet 1" sheet-data [["a1"]] workbook (create-workbook sheet-name sheet-data) a1 (-> workbook (.getsheetat 0) (.getrow 0) (.getcell 0))] (testing "set-cell! date" (testing "should set value" (set-cell! a1 (july 1)) (is (= (july 1) (.getdatecellvalue a1)))) (testing "should set nil" (let [^java.util.date nil-date nil] (set-cell! a1 nil-date)) (is (= nil (.getdatecellvalue a1))))) (testing "set-cell! string" (testing "should set value" (set-cell! a1 "foo") (is (= "foo" (.getstringcellvalue a1))))) (testing "set-cell! boolean" (testing "should set value" (set-cell! a1 (boolean true)) (is (.getbooleancellvalue a1)))) (testing "set-cell! number" (testing "should set int" (set-cell! a1 (int 1)) (is (= 1.0 (.getnumericcellvalue a1)))) (testing "should set double" (set-cell! a1 (double 1.2)) (is (= 1.2 (.getnumericcellvalue a1)))))))

i can't test looking for?

excel clojure

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -