styling certain cellsrowsor columns can help you emphasize important areas in your spreadsheet in the produce spreadsheetfor exampleyour program could apply bold text to the potatogarlicand parsnip rows or perhaps you want to italicize every row with cost per pound greater than $ styling parts of large spreadsheet by hand would be tediousbut your programs can do it instantly to customize font styles in cellsimportantimport the font(function from the openpyxl styles module from openpyxl styles import font this allows you to type font(instead of openpyxl styles font((see "importing moduleson page to review this style of import statement here' an example that creates new workbook and sets cell to have -pointitalicized font enter the following into the interactive shellimport openpyxl from openpyxl styles import font wb openpyxl workbook(sheet wb['sheet'italic font font(size= italic=truecreate font sheet[' 'font italic font apply the font to sheet[' ''helloworld!wb save('styles xlsx'in this examplefont(size= italic=truereturns font objectwhich is stored in italic font the keyword arguments to font()size and italicconfigure the font object' styling information and when sheet[' 'font is assigned the italic font object all that font styling information gets applied to cell font objects to set font attributesyou pass keyword arguments to font(table - shows the possible keyword arguments for the font(function table - keyword arguments for font objects keyword argument data type description name string the font namesuch as 'calibrior 'times new romansize integer the point size bold boolean truefor bold font italic boolean truefor italic font