Question: Write a python script that will pull data from two excel files and send an outlook email with an attached file which is combined information

Write a python script that will pull data from two excel files and send an outlook email with an attached file which is combined information of those two excel files.

Excel File 1: Project Information

Name

Projects

State

Count

Moon Lee

Food

AZ

23

Lee Wong

Flower

CA

34

Quian Fan

Market

GA

21

Moon Lee

Movie

TX

38

Lee Wong

Food

NY

44

Quian Fan

House

NC

23

Moon Lee

Flower

MN

56

Excel File 2: Outlook email information

Name

Email

Moon Lee

Moon.lee@outlook.com

Lee Wong

Lee.wong@outlook.com

Quian Fan

Quian.fan@outlook.com

Python script will first match the Name column in both of the excel files and based on name, from excel file 2, It will grab the email and will send information from excel file 1 whose email matched with the name column.

Output:

Email : Moon.lee@outlook.com

Hello Moon Lee,

Please see the below list of the projects you have:

Name

Projects

State

Count

Moon Lee

Food

AZ

23

Moon Lee

Movie

TX

38

Moon Lee

Flower

MN

56

Likewise, Lee Wong and Quian Fan will get their project lists at their outlook email address.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!