working with excel files from openpyxl import workbook def main()print('starting write excel example with openpyxl'workbook workbook(get the current active worksheet ws workbook active ws title 'my worksheetws sheet_properties tabcolor ' baws[' ' ws[' ' ws[' ''=sum( )ws workbook create_sheet(title='my other sheet'ws [' ' ws append([ ]ws cell(column= row= value= workbook save('sample xlsx'print('done write excel example'if __name__ ='__main__'main(the excel file generated from this can be viewed in excel as shown below