Skip to content
Snippets Groups Projects
Commit 188e72cb authored by sun's avatar sun Committed by Cam Saul
Browse files

Replace XSSFWorkbook with SXSSFWorkbook (#12521)

parent 17d21893
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
[i18n :refer [tru]]])
(:import java.io.OutputStream
org.apache.poi.ss.usermodel.Cell
org.apache.poi.xssf.usermodel.XSSFWorkbook))
org.apache.poi.xssf.streaming.SXSSFWorkbook))
(defmethod i/stream-options :xlsx
[_]
......@@ -35,7 +35,7 @@
;; TODO -- this is obviously not streaming! SAD!
(defmethod i/streaming-results-writer :xlsx
[_ ^OutputStream os]
(let [workbook (XSSFWorkbook.)
(let [workbook (SXSSFWorkbook.)
sheet (spreadsheet/add-sheet! workbook (tru "Query result"))]
(reify i/StreamingResultsWriter
(begin! [_ {{:keys [cols]} :data}]
......@@ -46,4 +46,5 @@
(finish! [_ _]
(spreadsheet/save-workbook-into-stream! os workbook)
(.dispose workbook)
(.close os)))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment