Search code examples
c#excelvbasyncfusion

How to enable edition in syncfusion c#


I need to enable edition by default in a excel file created with syncfusion in C# using worksheets. It has macros and formulas but when somebody download this file, it opens in protected view and only calculates formulas after you enable editing and change to unprotected. ¿Is there a way to skip the protected mode warning and once you download the file you can see everything working?


Solution

  • It is the behavior of MS Excel to open the Excel files that are downloaded from the browser in protected view to ensure protection from viruses. This behavior can be disabled through options in Microsoft Excel.

    ​However, Syncfusion XlsIO has support for formula calculation, and we suggest you call the Calculate method of IWorksheet, before saving the Excel document to get the formulas calculated.