code: def document_to_workbook(doc, wb=None, base_url=None):
      """
      Takes a string representation of an html document and writes one sheet for
      every table in the document.
      The workbook is returned
      """
      if not wb:
          wb = Workbook()
          wb.remove(wb.active)
  
      inline_styles_doc = Premailer(
          doc, base_url=base_url, remove_classes=False
      ).transform()
      tables = get_Tables(inline_styles_doc)
  
      for table in tables:
          table_to_sheet(table, wb)
  
      return wb
  
file_path: PaddleOCR/ppstructure/table/tablepyxl/tablepyxl.py
imports: from __future__ import absolute_import
  from lxml import html
  from openpyxl import Workbook
  from openpyxl.utils import get_column_letter
  from premailer import Premailer
  from tablepyxl.style import Table
label_desc: Use image node_id 5 for calling a global function with example usage: document_to_workbook(doc, wb, base_url) and returns: wb