convert_markdown_to_xlsx
Extract all HTML and Markdown pipe tables from a Markdown file and write each to a separate worksheet in an Excel (.xlsx) file, preserving merged cells, bold text, and alignment.
Instructions
Convert Markdown tables to an Excel (.xlsx) file.
Extracts every HTML and Markdown pipe table from the document (in document order) and writes each to its own worksheet. Preserves colspan/rowspan merged cells, inline bold, and text-align alignment.
Styling:
Font: 微软雅黑 (11pt body), thin borders on all cells
Header cells (HTML or the first row of a pipe table): bold + light gray fill
All cells: vertical center, wrap text
Column widths and row heights estimated from content
Args: input_path: Absolute path to the input Markdown file. output_path: Output .xlsx path. Defaults to /.xlsx. font_name: Optional font name override (default 微软雅黑). body_size: Optional body font size override (default 11).
Returns: Summary string with input path, output path, file size, and sheet count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body_size | No | ||
| font_name | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |