Openpyxl - Dir

 

  • print(dir(openpyxl)
  •  

     

    To view the chart

     

  • print(dir(openpyxl.chart))
  •  

     

    Openpyxl - Create Bar chart

     

    How this program works:

  • This is in dynamic nature with respect to data
  •  

  • We can add N number of elements in lists
  •  

  • You don't need to create a excel workbook before excuting the program
  •  

  • openpyxl package itself creates a workbook and append the chart based on selected data on worksheet
  •  

  • INPUT function enables the user to select Starting and ending elements of list
  •  

  • Chart will be created based on element number mentioned in INPUT function
  •  

  • We can create charts in multiple workbooks by changing the workbook name in WKB.SAVE() method
  •  

  • If we didn't change the wokbook, it overwrites the existing the chart in same workbook
  •  

    Complete Code:

     

     

  • You can download the program from below and unzip
  •