excel-export
excel-export copied to clipboard
Add support for loading "templates" from InputStream
WebXlsxExporter needs a constructor
WebXlsxExporter(InputStream stream) {
...
}
to support loading of templates from resources.
Right now the work around is:
def template =grailsApplication.parentContext.getResource("classpath:ReportTemplate.xlsx").inputStream
tempFile = File.createTempFile("ReportTemlate", ".xlsx")
tempFile << template
new WebXlsxExporter(tempFile.absolutePath).with { ... }
This issue held me up for more hours than I would like to admit. How can I contribute to adding a constructor?
+1