Skip to content

Instantly share code, notes, and snippets.

@wis3f1sh
wis3f1sh / gist:e0a1c7ef0f3b86b09df5b6bc9fdee9c9
Created April 28, 2023 11:13
there are two errors in this code: ["create_chart" is not defined] and ["save_workbook" is not defined], what am I doing wrong? P.S. openpyxl is already installed
from openpyxl import *
# Open Excel file
wb = load_workbook("diagram.xlsx")
ws = wb["Sheet1"]
# Get data areas
data = ws[2].values
# Create a chart from this data