Harinath Br wrote:Please suggest is there any way to stream the data partly instead of loading entire file using Workbook workbook = WorkbookFactory.create(new File(fileDirectory, fileName)); or XSSFWorkbook xssfWb = new XSSFWorkbook(opcPackage); bcz I am getting error at this line only.
No, that's not how the WorkbookFactory class works.
It might be possible to use other features of the POI project to provide a "streamed" version of the data, but I don't know that for sure. Somehow I doubt it, because I'm not sure what exactly would be streamed. It's easy for somebody who just thinks of Excel as a grid with cells which might contain data to ask for that, but for somebody who has to write code which can deal with all of the thousands of different kinds of objects which might be present in an Excel document, it isn't really all that simple.