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().
Question
I recently started using docling to export the content of an Excel (.xlsx) file to markdown (md).
I am using the standard
DocumentConverterwith 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
DoclingDocumentdoes differentiate between sheets. For example, itstablesattribute is a list containing as manyTableItemobjects 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
DoclingDocumentwhile 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_noparameter in the method.export_to_markdown().