chartobj openpyxl chart barchart(chartobj title 'my chartchartobj append(seriesobjsheet add_chart(chartobj' 'wb save('samplechart xlsx'this produces spreadsheet that looks like figure - the top-left corner is in figure - spreadsheet with chart added we've created bar chart by calling openpyxl chart barchart(you can also create line chartsscatter chartsand pie charts by calling openpyxl charts linechart()openpyxl chart scatterchart()and openpyxl chart piechart(summary often the hard part of processing information isn' the processing itself but simply getting the data in the right format for your program but once you have your spreadsheet loaded into pythonyou can extract and manipulate its data much faster than you could by hand you can also generate spreadsheets as output from your programs so if colleagues need your text file or pdf of thousands of sales contacts transferred to spreadsheet fileyou won' have to tediously copy and paste it all into excel equipped with the openpyxl module and some programming knowledgeyou'll find processing even the biggest spreadsheets piece of cake in the next we'll take look at using python to interact with another spreadsheet programthe popular online google sheets application working with excel spreadsheets