Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:11:13+00:00 2026-06-17T09:11:13+00:00

I Need technology choice to process larger XLS files using Java It needs to

  • 0

I Need technology choice to process larger XLS files using Java

  1. It needs to process xmls files without out-of-memory exception

  2. It needs to be optimized on memory (working memory) usage

pls suggest

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:11:14+00:00Added an answer on June 17, 2026 at 9:11 am

    Apache POI framewor is best choice – link

    It’s event-based-api helps best memory optimization

    It can process larger excel sheets if implemented properly as shown here

    Example Reading large files:

        public void parseExcel(File file) throws IOException {
    
                OPCPackage container;
                try {
                    container = OPCPackage.open(file.getAbsolutePath());
                    ReadOnlySharedStringsTable strings = new ReadOnlySharedStringsTable(container);
                    XSSFReader xssfReader = new XSSFReader(container);
                    StylesTable styles = xssfReader.getStylesTable();
                    XSSFReader.SheetIterator iter = (XSSFReader.SheetIterator) xssfReader.getSheetsData();
                    while (iter.hasNext()) {
                        InputStream stream = iter.next();
    
                        processSheet(styles, strings, stream);
                        stream.close();
                    }
                } catch (InvalidFormatException e) {
                    e.printStackTrace();
                } catch (SAXException e) {
                    e.printStackTrace();
                } catch (OpenXML4JException e) {
                    e.printStackTrace();
                }
    
        }
    
        protected void processSheet(StylesTable styles, ReadOnlySharedStringsTable strings, InputStream sheetInputStream) throws IOException, SAXException {
    
                InputSource sheetSource = new InputSource(sheetInputStream);
                SAXParserFactory saxFactory = SAXParserFactory.newInstance();
                try {
                    SAXParser saxParser = saxFactory.newSAXParser();
                    XMLReader sheetParser = saxParser.getXMLReader();
                    ContentHandler handler = new XSSFSheetXMLHandler(styles, strings, new SheetContentsHandler() {
    
                    @Override
                        public void startRow(int rowNum) {
                        }
                        @Override
                        public void endRow() {
                        }
                        @Override
                        public void cell(String cellReference, String formattedValue) {
                        }
                        @Override
                        public void headerFooter(String text, boolean isHeader, String tagName) {
    
                        }
    
                    }, 
                    false//means result instead of formula
                    );
                    sheetParser.setContentHandler(handler);
                    sheetParser.parse(sheetSource);
                } catch (ParserConfigurationException e) {
                    throw new RuntimeException("SAX parser appears to be broken - " + e.getMessage());
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to call a stored procedure using JPA and found this article: http://www.oracle.com/technology/pub/articles/vasiliev-jpql.html
I need to process 300 GB log files per day ( Import -> Convert
I need to build an installer for my application (using Windows Installer technology -
I'm using Freemarker as my view technology for a Spring MVC application. I need
I need to start developing using this technology servlets/jsp with tomcat. I need to
I am new to servlet technology, i need to write code to download files
I need to familiarize myself with this technology. My problem is that Google is
Let's say I need to develop a plugin for a given technology not supported
I have multiple applications each having a GUI from a different technology. I need
Over the next few months, we need to consider the best technology/technique for periodically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.