Skip to content

Export to markdown of multi-sheet .xlsx file #1292

Description

@Fedezzab

Question

I recently started using docling to export the content of an Excel (.xlsx) file to markdown (md).

I am using the standard DocumentConverter with the default pipeline for this format. However, I noticed that when processing a file with multiple sheets, the .export_to_markdown() method simply aggregates the content of all sheets into a single markdown output.

While debugging, I observed that the corresponding DoclingDocument does differentiate between sheets. For example, its tables attribute is a list containing as many TableItem objects as there are sheets in the file.

Is there a clean way to export the content of different sheets separately? I found one approach, but it's quite naïve—it involves creating deep copies of the DoclingDocument while restricting its attributes to individual tables, one by one.

I would like to achieve the same result in a more efficient way, similar to how it's possible to export a PDF page by page using the page_no parameter in the method .export_to_markdown().

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmarkdownissue related to markdown backendquestionFurther information is requestedxlsxissue related to xlsx backend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions