First of all - you have to make sure that your files are within the well defined limitations of the tool - see here.
Beyond that, it seems to be a pretty common problem to run out of memory for larger files, and one solution is to process XML data "manually":
If memory footprint is an issue, then for XSSF, you can get at the underlying XML data, and process it yourself. This is intended for intermediate developers who are willing to learn a little bit of low level structure of .xlsx files, and who are happy processing XML in java. Its relatively simple to use, but requires a basic understanding of the file structure. The advantage provided is that you can read a XLSX file with a relatively small memory footprint.
( quoted from here )