ABCLはJVM上で動作するCommon Lisp処理系なので、Javaのライブラリが利用できます。
(require :abcl-contrib) (require :abcl-asdf) (asdf:defsystem apache-poi :components ((:mvn "org.apache.poi/poi/3.8") (:mvn "org.apache.poi/poi-ooxml/3.8"))) (asdf:load-system 'apache-poi) (defpackage :test-poi (:use :cl :jss)) (in-package :test-poi) (defun create-9x9 (path) (let* ((wb (new 'xssfworkbook)) (sh (#"createSheet" wb))) (dotimes (i 9) (#"createRow" sh i)) (dotimes (i 9) (dotimes (j 9) (#"setCellValue" (#"createCell" (#"getRow" sh j) i) (format nil "~A" (* (1+ i) (1+ j)))))) (#"write" wb (new 'fileoutputstream path)))) (create-9x9 "test.xlsx")
0 件のコメント:
コメントを投稿