Python openpyxl — Change font to italic

Scriptopia
Mar 10, 2023

--

Python script that will change font to italic within an existing Excel spreadsheet using the openpyxl library. Openpyxl is a library that allows us to interact with Excel files in Python. It provides a range of tools for reading, writing, manipulating, and formatting Excel data. This makes it a useful tool for data analysis and reporting tasks.

See the example below where we change the font to italic for cell ‘A1’ within our existing spreadsheet. If you found this useful be sure to subscribe to our YouTube channel for daily coding content.

https://scriptopia.co.uk/2023/03/10/python-openpyxl-change-font-to-italic/

--

--

Scriptopia

Programming - Projects - Source Code available for everything - Scriptopia.co.uk