In this tutorial, we will create an automation for the following process:
- Copy the data in a spreadsheet with supplier information to a new sheet.
- Filter the data to show only the rows with suppliers from the Services and IT industries that were added in the last 10 years.
- Copy the filtered data to a CSV file.
- Send the CSV file by email.
We will create a project with the following activities:
- An Excel File Card to indicate the Excel file with supplier information.
- A Copy Paste Range activity to copy the data to another sheet.
- Two Filter activities to filter the data according to the desired criteria: one filter for the Industry column, the other for the Supplier Since column.
- A Write CSV activity to copy the filtered data to a CSV file.
- An Outlook Account Card to indicate the Outlook account from which to send the email.
- A Send Outlook Mail activity to send the email.
Step 1: Set up the project and get the necessary files.
- Create a new project using the default settings.
- Download and extract the archive with the automation project in this tutorial using the button at the bottom of this page. Copy the file Suppliers.xlsx to your project folder.
Step 2: Add the Excel file to the project.
- Click  on the Designer panel, and then, in the Common Scenarios section of the search box at the top of the screen, select Use Excel File, and browse to and select the file Suppliers.xlsx. An Excel File Card activity is added to the Designer panel. on the Designer panel, and then, in the Common Scenarios section of the search box at the top of the screen, select Use Excel File, and browse to and select the file Suppliers.xlsx. An Excel File Card activity is added to the Designer panel.
- In the activity, in the field And reference it later as enter Suppliers.
 You have indicated that you will work on the file Suppliers.xlsx that is known in your automation as Suppliers.
 
Step 3: Copy the data to another sheet and apply the filters.
- Click  inside the Excel File Card and then, in the search box at the top of the screen, locate and select Copy Paste Range. A Copy Paste Range activity is added to the Designer panel. inside the Excel File Card and then, in the search box at the top of the screen, locate and select Copy Paste Range. A Copy Paste Range activity is added to the Designer panel.
- In the Copy Paste Range activity:- Click  on the right side of the Source range field, and then select Suppliers > Data [Sheet]. on the right side of the Source range field, and then select Suppliers > Data [Sheet].
- Click  on the right side of the Destination range field, and then select Suppliers > Processed [Sheet]. on the right side of the Destination range field, and then select Suppliers > Processed [Sheet].
 You have indicated that you want to copy the data from the Data sheet of the Suppliers file and paste it to the Processed sheet in the same file.
 
- Click 
- Click Save in the ribbon menu to save the automation, then click Run to execute the automation.
 The data is copied from the Data sheet to the Processed sheet in the Suppliers workbook.
- Click  inside the Excel File Card just below the Copy Paste Range activity, and then, in the search box at the top of the screen, locate and select Filter. A Filter activity is added to the Designer panel. inside the Excel File Card just below the Copy Paste Range activity, and then, in the search box at the top of the screen, locate and select Filter. A Filter activity is added to the Designer panel.
- In the Filter activity:- Click  on the right side of the Source range field, and then select Suppliers > Processed [Sheet]. on the right side of the Source range field, and then select Suppliers > Processed [Sheet].
- Click  on the right side of the Column name field, and then select Column Name > Industry. on the right side of the Column name field, and then select Column Name > Industry.
- Click the Filter button. In the Filter window, make sure Basic filter is selected, and then:
 Click on the right side of the Value field, and then select Text. In the Text Builder, enter on the right side of the Value field, and then select Text. In the Text Builder, enterServices, and then click Save.
 Click Add to add a second value.
 * Click on the right side of the second Value field, and then select Text. In the Text Builder, enter on the right side of the second Value field, and then select Text. In the Text Builder, enterIT, then click Save, and then click OK to close the Filter window.
 You have indicated that you want to filter the data in the Processed sheet to show only the rows with the values Services or IT in the Industry column.
 
- Click 
- Click  inside the Excel File Card just below the Filter activity, and then, in the search box at the top of the screen, locate and select Filter. A second Filter activity is added to the Designer panel. inside the Excel File Card just below the Filter activity, and then, in the search box at the top of the screen, locate and select Filter. A second Filter activity is added to the Designer panel.
- In the second Filter activity:- Click  on the right side of the Source range field, and then select Suppliers > Processed [Sheet]. on the right side of the Source range field, and then select Suppliers > Processed [Sheet].
- Click  on the right side of the Column name field, and then select Column Name > Supplier Since. on the right side of the Column name field, and then select Column Name > Supplier Since.
- Click the Filter button. In the Filter window:
- Select Advanced filter.
- From the Operator drop-down menu, select > (is greater than).
- Click  on the right side of the Value field, and then select Text. In the Text Builder, enter a date from 10 years ago, for example on the right side of the Value field, and then select Text. In the Text Builder, enter a date from 10 years ago, for example5/5/2009, then click Save, and then click OK to close the Filter window.
 You have indicated that you want to filter the data in the Processed sheet to show only the rows with dates after 5/5/2009 in the Supplier Since column.
 
- Click 
 
Step 4: Copy the filtered data to a CSV file and email the file.
- Click  just below the Excel File Card, and then, in the search box at the top of the screen, locate and select Write CSV. A Write CSV activity is added to the Designer panel. Alternatively, you can also add this activity inside the Excel File Card, just below the last Filter activity. just below the Excel File Card, and then, in the search box at the top of the screen, locate and select Write CSV. A Write CSV activity is added to the Designer panel. Alternatively, you can also add this activity inside the Excel File Card, just below the last Filter activity.
- In the Write CSV activity:- Click  on the right side of the Write to what file field, and then select Text. In the Text Builder, enter on the right side of the Write to what file field, and then select Text. In the Text Builder, enterresult-, and then from the menu on the right side of the Text Builder select Workspace Excel > Date [Sheet] > YYYYMMDD [Cell]. The text in the Text Builder is updated to menu on the right side of the Text Builder select Workspace Excel > Date [Sheet] > YYYYMMDD [Cell]. The text in the Text Builder is updated toresult-Excel Date!YYYYMMDD. Enter the text.csvat the end and click Save. The final text should beresult-Excel Date!YYYYMMDD.csv.
- Click  on the right side of the Write from field, and then select Suppliers > Processed [Sheet]. on the right side of the Write from field, and then select Suppliers > Processed [Sheet].
 You have indicated that you want to create a CSV file in the project folder whose name contains the text result- and today's date and that you want to copy the data in the Processed sheet to it.
 
- Click 
- Click  just below the Write CSV activity, and then, in the Common Scenarios section of the search box at the top of the screen, select Use Outlook Account. An Outlook Account Card is added to the Designer panel. just below the Write CSV activity, and then, in the Common Scenarios section of the search box at the top of the screen, select Use Outlook Account. An Outlook Account Card is added to the Designer panel.
- In the activity, the default email account is already selected in the Select mail account field. If you want to use a different account, select it from the drop-down menu.
 In the And reference it later as field, leave the default valueOutlookas the name under which to refer to the account in the automation.
- Click  inside the Outlook Account Card, and then, in the search box at the top of the screen, locate and select Send Outlook Email. A Send Outlook Email activity is added to the Designer panel. inside the Outlook Account Card, and then, in the search box at the top of the screen, locate and select Send Outlook Email. A Send Outlook Email activity is added to the Designer panel.
- In the Send Outlook Email activity:- Click  on the right side of the From account field, and then select Outlook. on the right side of the From account field, and then select Outlook.
- Click  on the right side of the To field, and then select Text. In the Text Builder window, enter an email address where to send the email. For example, you can enter your own email address to send the email to yourself. on the right side of the To field, and then select Text. In the Text Builder window, enter an email address where to send the email. For example, you can enter your own email address to send the email to yourself.
- Click  on the right side of the Subject field, and then select Text. In the Text Builder window, enter on the right side of the Subject field, and then select Text. In the Text Builder window, enterList of filtered suppliers for, and then, from the menu on the right side of the Text Builder, select Workspace Excel > Date [Sheet] > Today [Cell]. The final text should look like this: menu on the right side of the Text Builder, select Workspace Excel > Date [Sheet] > Today [Cell]. The final text should look like this:List of filtered suppliers for [Excel]Date!Today. Click Save to close the Text Builder.
- Click  on the right side of the Body field, and then select Text. In the Text Builder window, enter text for the body of the email, for example on the right side of the Body field, and then select Text. In the Text Builder window, enter text for the body of the email, for examplePlease see attachment.
- For Attachments, select Files, then click  on the right side of the field, and then select Text. In the Text Builder, enter the file name in the same way you entered it in the Write CSV activity: on the right side of the field, and then select Text. In the Text Builder, enter the file name in the same way you entered it in the Write CSV activity:result-Excel Date!YYYYMMDD.csv. One way you could do this is to select all the text in the Text Builder of the Write to what file field in the Write CSV activity, copy the text, and then paste it to the Text Builder of the Attachments field.
 
- Click 
 
- Click Save on the ribbon menu to save the automation, then click Run to execute the automation.
The data in the Processed sheet is filtered, then copied to a CSV file that has today's date in the name, and then the CSV file is emailed.
 Updated 2 years ago