How to set AutoRecover property of Workbook

The following code demonstrates how to use the Workbook.Settings.AutoRecover property of the workbook. The code first reads the default value of this property (which is true), then sets it to false and saves the workbook. It then reloads the workbook and reads the property value, which is now false.

C# code to set the AutoRecover property of Workbook

Output

Here is the console output of the above sample code.

AutoRecover: True

AutoRecover: False