Skip to main content
Practice

Converting Project Progress Excel Data to PPTX Slides

In this project, we assume a scenario where the project progress is managed in Excel, and we need to convert this data into PowerPoint slides for reporting purposes.

While it's possible to manually create each slide from the Excel data, we can automate this repetitive task using Python.


Project Status Data

The example Excel data we'll work with in this lesson records the status of a marketing campaign project.

Project NameProgress (%)Start DateEnd DateIssues
Website Redesign802024-07-012024-12-31Development delay
Marketing Campaign502024-08-152024-11-15None
New Product Launch302024-09-012025-01-31Production issues

Project Name uniquely identifies each project, and Progress indicates the percentage of the project completed.

Start Date and End Date help track the project timeline, while the Issues column records major problems encountered during the project's progress.


Loading the Excel File with Python

Let's explore how to load the Excel data using Python.

We'll use the openpyxl library to handle the Excel file.

You can read the Excel file with the load_workbook method and read data row by row using the iter_rows method as shown below.

Loading the Excel File
import openpyxl

# Open the Excel file
wb = openpyxl.load_workbook('input_file.xlsx')
sheet = wb.active

# Read data from the Excel sheet
for row in sheet.iter_rows(min_row=2, values_only=True): # Start reading from the 2nd row (excluding header)
project_name, progress, start_date, end_date, issues = row
print(f"Project: {project_name}, Progress: {progress}%, Issues: {issues}")

This code loads information about each project from the Excel file and prints it.

The load_workbook function from the openpyxl library is used to read the Excel file, and the iter_rows method reads the data row by row.

We use the min_row=2 option to exclude the header while fetching data.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.