def aw_read_table_id(table=None):
# 将表格转换为HTML
html = table.to_string(aw.SaveFormat.HTML)
# 使用BeautifulSoup解析HTML
soup = BeautifulSoup(html, "html.parser")
# 删除不需要的标签和属性,仅保留基本结构
allowed_Tags = ['…...删除不需要的标签和属性,仅保留基本结构 allowed_tags = ['table', 'tr', 'td'] for tag in soup.find_all():...find_all(): if tag.name not in allowed_tags: tag.unwrap() # 只保留标签中的内容,删除标签本身...