from openpyxl.formatting.rule import CellIsRule
from openpyxl.styles import PatternFill
# Define the fill color
green_fill = PatternFill(start_color='C6EFCE', end_color='C6EFCE', fill_type='solid')
# Add conditional formatting
sheet.conditional_formatting.add(
'E2:E100',
CellIsRule(operator='greaterThan', formula=['4000'], fill=green_fill)
)
# Save the workbook
workbook.save('sales_report_highlighted.xlsx')
Create a summary sheet to show the total sales for all products and the highest-selling product.