Question
1
Replies
45
Views
Posted: February 7, 2020
Last activity: July 21, 2020
Microsoft Excel Component - Close Excel Without Saving
I have an automation that launches an Excel document and does some automatic filtering. When it is done I would like to close the Excel without saving. Currently, when I use the Close method for the microsoftExcel component, a file explorer dialog box pops up asking me where to save the document. Do I have to handle clicking 'Cancel' on this dialog box? Or is there a way to close without saving or undo all changes automatically?
Hi,
Yes, you can handle, Clicking "Cancel" button with the help of UIAutomation script. Use script component and write a method to click the cancel button and call the method based on the usage.
Ref Link: https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview