OpenPyXL minimal XLSX write example
This serves a minimal example of how to write an XLSX file using OpenPyXL:
from openpyxl import Workbook
wb = Workbook()
sheet = wb["Sheet"] # This sheet is created by default
# Add content to sheet
sheet["A1"] = "This is cell A1"
# Save
wb.save("openpyxl-test.xlsx")
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow