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 Name | Progress (%) | Start Date | End Date | Issues |
---|---|---|---|---|
Website Redesign | 80 | 2024-07-01 | 2024-12-31 | Development delay |
Marketing Campaign | 50 | 2024-08-15 | 2024-11-15 | None |
New Product Launch | 30 | 2024-09-01 | 2025-01-31 | Production 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.
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.