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 1052085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:02:13+00:00 2026-05-16T17:02:13+00:00

I am using Apache Poi and Java for Excel manipulation. I have modified some

  • 0

I am using Apache Poi and Java for Excel manipulation. I have modified some of the cell in Excel file by programmatically using Java.

After that, when I open that Excel file manually for seeing that update. After seeing, when I try to close the Excel file it again ask me like “do you want to save the changes you made to test.xls file.

If I press yes button, then only I can able to read the formula cell values programmatically further. Otherwise, if I access the formula cell value it returns 0 value.

How can I resolve this problem?

  • 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-05-16T17:02:14+00:00Added an answer on May 16, 2026 at 5:02 pm

    By default, POI reads the cached response to the formula when you read that cell. When you open the file with Excel, it will do the calculations. Then when you save the file the responses are saved along. Then when you read it with poi, you get the right answers.

    If you want the ‘correct’ answer you need to calculate the formula response. Last time I needed to do this I had to write my own parser, but now there’s this : http://poi.apache.org/spreadsheet/eval.html.

    Or in short:

    Workbook wb = new HSSFWorkbook(inputstream);
    FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
    ... snip ...
    CellValue value = evaluator.evaluate(cellWithFormula);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set Excel cell colors using Apache POI in Java. I played
i want to read the 2010 excel file in java using apache poi api
I'm generating an excel file using Apache POI 3.8 , and have the need
I have opened a large excel file as a Apache POI workbook (using VM
I am using Apache POI-HSSF for working with Excel files. I have a cell
I need to generate an .xls (Excel) file, using the Java library Apache POI
In Java, we're using the following package to programmatically create excel documents: org.apache.poi.hssf If
How can i put this string in to a cell using java apache poi?
I'm able to create an excel file using apache poi. however, i want users
I have just Extracted the cells from the excel sheet using Apache POI, everything

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.