I am trying to create the automated scatter plot in excel using python based on Mosh’s code in his tutorials. It code runs with no errors but when I open the excel file it has not produced a scatter plot. Any help would be appreciated. Below is my code: I have two columns of data with 5839 rows.
import openpyxl as xl
from openpyxl.chart import scatter_chart, Reference
def process_workbook(yield_cwp):
wb = xl.load_workbook(yield_cwp)
sheet = wb[“Sheet1”]
Values = Reference(sheet,
min_row=2,
max_row=5839,
min_col=1,
max_col=2)
chart = scatter_chart()
chart.add_data(Values)
sheet.add_chart(chart, "e2")
wb.save(yield_cwp)