To send a filtered Excel Report by mail

To send a filtered Excel Report by mail

Hi everyone,

In order to mantain a clean Database and an optimal number of records, I would like to do a procedure when an action is executed (for example when an employee leaves the company).

The procedure that I'm thinking is as following:

1. To send an email with an Excel Report attached containing the employee associated records from different forms (for example vacations, expenses, etc)

2. To delete the employee associated records

Which one is the best way to do that?

Thank you,

David