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

  • Home
  • SEARCH
  • 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 8938615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:40:06+00:00 2026-06-15T10:40:06+00:00

First of all, the code below has worked without problems for a while now.

  • 0

First of all, the code below has worked without problems for a while now.
I receive excel files from a colleague, which I read and upload with this program.
Recently the colleague was replaced, and I receive the files from another person.
I’ll check with him as well what exactly he does with the excel file.

Anyway, the first excel file I receive from the new colleague is getting me frustrated.
The code below exits on the WorkbookFactory.create(fis) call. No exceptions are thrown
and the program goes straight to the finally clause…

try {
        fis = new FileInputStream(f);            

        Workbook wb = WorkbookFactory.create(fis);

        Sheet ws = wb.getSheetAt(0);
        if (ws == null) {
            throw new ParseException("No sheet found on index 0", 1);
        }

        Iterator rowIt = ws.rowIterator();

        while (rowIt.hasNext()) {
            Row row = (Row) rowIt.next();
            if (row.getRowNum() != 0 && isArticleRow(row)) {
                Article article = parseArticleData(row);

                if (article != null) {
                    priceList.getArticles().add(article);
                }
            }
        }

        String vendorNumber = getVendorNumber(priceList);
        priceList.setVendorNumber(vendorNumber);

        priceList.setReadCorrectly(true);
        System.out.println("DONE");

    } catch (Exception e) {
        System.out.println(e.getMessage());

        _log.error(e.getMessage());
        if (priceList != null) {
            priceList.setReadCorrectly(false);
        }

    } finally {
        if (fis != null) {
            fis.close();
        }
        return priceList;
    }

I tried debugging, but I experience the same behaviour, and without an
exception being thrown, I’m not sure how to proceed.

Thanks in advance for your feedback.

  • 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-15T10:40:08+00:00Added an answer on June 15, 2026 at 10:40 am

    Catch Throwable and see instead of Exception. It should work.

    } catch (Throwable e) {
        System.out.println(e.getMessage());
    
        _log.error(e.getMessage());
        if (priceList != null) {
            priceList.setReadCorrectly(false);
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code (without showing it all) is my first attempt at using classes.
With the code below I am able to open all text files in my
First, an example of something that works as expected: (all code was executed in
First of all I want to mention two things, One: My code isn't perfect
First of all, do not be overwhelmed by the long code, I just put
I have the code: <% generate_bullets = Bullet.all %> <% generate_bullets.shuffle.first(4).each do |t| %>
I'm using the code: <h2> <% random_bullets = Bullet.all %> <ul> <% random_bullets.shuffle.first(4).each do
first of all some details: I configured security as below in web.xml view plaincopy
First of all, I'm quite new to the Android and JAVA world (coming from
I developed a css menu and it has worked fine across all browsers in

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.