- HD
- 720p
- 540p
- 360p
- 0.50x
- 0.75x
- 1.00x
- 1.25x
- 1.50x
- 1.75x
- 2.00x
We hope you enjoyed this lesson.
Cool lesson, huh? Share it with your friends
About this lesson
We can change the font color and sizing by using the font property.
Exercise files
Download this lesson’s related exercise files.
Cell Font Properties60.3 KB Cell Font Properties - Solution
58.2 KB
Quick reference
Cell Font Properties
We can change the font color and sizing by using the font property.
When to use
Use these techniques whenever you want to change the style of the text in a cell.
Instructions
# Import Font:
from openpyxl.styles import Font
# Define the cell you want to style
cell = ws['A2']
# Style your cell
cell.font = Font(
color = "333333",
size = 18,
bold = False,
italic = False,
underline = 'none',
strike = False
)
Hints & tips
- from openpyxl.styles import Font
- cell.font = Font()
Lesson notes are only available for subscribers.