I am using Grails 2.4.4 and trying to download the .xlsx file using the apache poi plugin, but I get a JAVA Heap size exception when the file size is about 8 MB.
My controller has the following actions and methods: -
def uploadForm() { String fileName = "D:\\File.xlsx" Map excelSheetMap = process(fileName) } Map process(String fileName) { ExcelBuilder excelBuilder = new ExcelBuilder(fileName)
The ExcelBuilder.groovy class file looks something like this:
class ExcelBuilder { Workbook workbook ExcelBuilder(String fileName) { new File(fileName).withInputStream { is -> workbook = new XSSFWorkbook(is) } } }
I also tried using the grails-excel-import plugin, but I get the same exception.
Can anyone suggest how to import large Excel files into grails. Thanks in advance.
source share