I am using the following code:
File file = new File(\"abc.xlsx\"); InputStream st = new FileInputStream(file); XSSFWorkbook wb = new XSSFWorkbook(st);
Consider using the Streaming version of POI. This will load a subset of the file into memory as needed. It is the recommended method when dealing with large files.
POI SXSSF