Hi @Wylfritz_Tyson,
You need to find a property in the UiExplorer to differentiate between Cancel and Close for the Click Activity.
Usually, the aaname property in the selector will do. Select the aaname in the selector and have it as “Close”.
You also need to On Element Appear with the same selector as above to wait before click until it exports the excel records.
Thanks and Regards,
Ranjith Udayakumar