Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
815
Excel Files Always Open In Protected View
posted

I am using Infragistics version 16.1 to generate Excel files that contain formulas.

Every Excel file that my software generates opens in Protected View with a message at the top that says "Enable Editing". If I click on "Enable Editing", it will no longer open in protected view. Even if I close and re-open the file at a later time.

When in protected view, all cells that have formulas show a value of "#NAME?" until I click on the "Enable Editing" button. Then the formulas are evaluated properly within their cells.

The problem is that sometimes my software needs to generate these Excel files, then read data out of the files at another point in time. But since the file is in protected view, the value that is returned from my cell is "#NAME?" instead of the numerical value that should be returned.

I have tried calling the Unprotect() method before saving. I have inspected the "IsProtected" values at both the Workbook and the Worksheet levels and they all show false.

Can anyone offer some advice on how to stop these Excel files from opening in protected view?

  • 12480
    Offline posted

    Hi Jouin,

    I tried creating a sample Excel file to see if formulas would work correctly. I tested some basic arithmetic and the SUM formula. Run this sample to see whether the workbook is protected for you. If not, please modify the sample with code from your application to reproduce the issue and send it back to me.

    ExcelProtected.zip