How to Solve NameError: name 'Workbook' is not defined -- openpyxl
Solution: Import the 'Workbook' module
To Solve the error, add the following line to the top of your code.
from openpyxl.workbook import Workbook
For more information:
Python openpyxl Workbook