I have a scenario in my project where user uploads XLS file with 1Million record and I need to conver this xls file to csv file and then sql server job will process the csv file.
I have a process to convert xls file to csv - but when I deploy this code in PCF it starts throwing heap memory erorr. I am also getting the same error in my local environment.
Code Snapshot:
String inputFileName = "UserInput.xls";
FileInputStream input_document = new FileInputStream(new File(inputFileName));
Workbook my_xls_workbook = StreamingReader.builder().open(input_document);//this line throws out of memory error.
Sheet sheet = my_xls_workbook.getSheetAt(0);
...... remaing code reads the sheet object and perform conversion.