Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
You can use Aspose.Cells to set the AutoRecover property of the workbook. The default value of this property is true. When you set it to false for a workbook, Microsoft Excel disables AutoRecover (autosave) for that Excel file.
Aspose.Cells provides the Workbook.getAutoRecover() and Workbook.setAutoRecover() methods to enable or disable this option.
The following code demonstrates how to use the Workbook.getAutoRecover() method. The code first reads the default value of this property, which is true; then it sets it to false and saves the workbook. Afterwards, it reads the workbook again and retrieves the value of this property, which is now false.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Create workbook object
const workbook = new AsposeCells.Workbook();
// Read AutoRecover property
console.log("AutoRecover: " + workbook.getSettings().getAutoRecover());
// Set AutoRecover property to false
workbook.getSettings().setAutoRecover(false);
// Save the workbook
workbook.save(path.join(dataDir, "output_out.xlsx"));
// Read the saved workbook again
const workbook2 = new AsposeCells.Workbook(path.join(dataDir, "output_out.xlsx"));
// Read AutoRecover property
console.log("AutoRecover: " + workbook2.getSettings().getAutoRecover());
Here is the console output of the above sample code.
AutoRecover: True
AutoRecover: False
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.