I want to serve an excel file from compojure. My objective is to open a template excel file in the resources folder of my compojure project, modify it and then serve it as a response.
Loading the file is easy:
(defn download-xls []
(let [template-file (io/file (io/resource "template.xls"))
fio (FileInputStream. template-file)
workbook (HSSFWorkbook. fio)]
Then I perform some modifications to the content of the file using HSSF. The question is how do I return it as a response?
Thanks