getShowFormulas / setShowFormulas

I’ve recently had issue with a spreadsheet that reports worksheet.getShowFormulas() == false.
That causes cells with valid formulas to return an empty string, and their value type to be reported as IS_NULL.
And effectively, the Javadoc indicates that is the expected behavior:

public boolean getShowFormulas() / public void setShowFormulas(boolean value)
Indicates whether to show formulas or their results.

I have a couple questions around this:

  1. which is the option in Excel that allows to save a spreadsheet in this state? I’ve been unable to find it.
    Actually, simply opening this file in Excel and saving it again ‘fixes’ this issue. Is this an ancient print option that has been deprecated since?

  2. unzipping the XLSX file shows one of the cells affected as this:

<c r="F20" s="5"><f>5220.49</f></c>

Resaving it with MS Excel results in the cell stored as:

<c r="F20" s="5"><f>5220.49</f><v>5220.49</v></c>

Does this mean a calculated value was not stored in the original, just the formula?

PD: using Aspose.Cells for Java 19.10

Thank you in advance!

@malbanesiascii,

For your queries.

  1. In MS Excel, you may enable/disable “Show Formulas” of Formulas menu.
  2. When you save the file in MS Excel, it saves the calculated value.