Question : openpyxl check if worksheet exists
Answered by : successful-starling-4ylwg02mukwz
from openpyxl import load_workbook
wb = load_workbook(file_workbook, read_only=True) # open an Excel file and return a workbook
if 'sheet1' in wb.sheetnames: print('sheet1 exists')
Source : https://stackoverflow.com/questions/37966536/python-validate-if-a-sheet-exists-in-my-document-xls | Last Update : Sat, 29 Jan 22