code: def excel_to_bytes(wb: Workbook) -> bytes:
      
      memfile = io.BytesIO()
      wb.save(memfile)
      return memfile.getvalue()
docs: Obtain a binary version of an :class:`openpyxl.Workbook` representation of
      an Excel file.