Skip to content

Formula value blank in "Protected View" - how to provide initial value? #93

@wildhart

Description

@wildhart

Describe the bug
When a generated Excel file includes formulas, and the file is generated by a website and downloaded, Excel opens the file in "Protected View" and the formula cells are displayed as blank (note that Protected View is NOT activated when files are downloaded from localhost).

Is there a way to provide initial values for the cells which contain formulas?

To Reproduce

  1. Generate a cell which contains a formula, using wc.formula("....")
  2. Upload the code to a webserver (not served from localhost)
  3. Generate and download the file.
  4. Open the file in Excel.

The file looks like this and the formulas are blank:

image

  1. It's necessary to click on "Enable Editing" to display the formula values:

image

Note that I cannot instruct all my webapp users to disable "Protected View".

Expected behavior
The result of each formula should be visible even in "Protected View".

Additional context
I have tried adding a number to the cell as well as a formula with:

wc.number(100);
wc.formula(....);

And although this increases the size of the generated file, the numbers are not displayed in protected view.

Is there a solution to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions