python - Saving openpyxl file via text and filestream - Stack Overflow

PHOTO EMBED

Wed Apr 13 2022 12:54:46 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user]

from io import BytesIO
from openpyxl import Workbook

wb = Workbook()
virtual_workbook = BytesIO()
wb.save(virtual_workbook)

# now use virtual_workbook to send to a stream; email attachment, etc

content_copyCOPY

https://stackoverflow.com/questions/8469665/saving-openpyxl-file-via-text-and-filestream