xxxxxxxxxx
import openpyxl
# Load the workbook
workbook = openpyxl.load_workbook('example.xlsx')
# Select the sheet you want to work with
sheet = workbook['Sheet1']
# Access a specific cell and print its value
print(sheet['A1'].value)
# Modify the value of a cell
sheet['A1'] = 'Hello, World!'
# Save the changes
workbook.save('example.xlsx')