How to set AutoRecover property of Workbook
You can use Aspose.Cells to set AutoRecover property of workbook. The default value of this property is true. When you set it false on a workbook, Microsoft Excel disables Autorecover (Autosave) on that Excel file.
Aspose.Cells provides Workbook.getSettings().setAutoRecover() property to enable or disable this option.
Java code to set AutoRecover property of Workbook
The following code explains how to use Workbook.getSettings().setAutoRecover() property of the workbook. The code first reads the default value of this property which is true, then it sets it as false and saves the workbook. Then it reads the workbook again and reads the value of this property which is false at this time.
Output generated by sample code
Here is the console output of the above sample code.
AutoRecover: true AutoRecover: false