How to configure docling to export from xlsx without hidden value ? #2986
Replies: 1 comment 3 replies
-
|
Hi @kennard520! I'm Dosu and I’m helping the docling team. Docling does not currently support excluding hidden rows or columns from XLSX exports via configuration or backend options. The XLSX backend parses all data in the used region of each visible sheet, regardless of whether rows or columns are hidden. Only fully hidden (invisible) sheets are skipped during processing—hidden rows and columns within visible sheets are always included in the export. There is no documented or code-level option to change this behavior (source, discussion). A practical workaround is to preprocess your XLSX file to remove or unhide hidden rows and columns before running Docling. You can do this with pandas or openpyxl. For example, using openpyxl: from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
for ws in wb.worksheets:
# Remove hidden rows
for row_idx in list(ws.row_dimensions):
if ws.row_dimensions[row_idx].hidden:
ws.delete_rows(row_idx)
# Remove hidden columns
for col_idx in list(ws.column_dimensions):
if ws.column_dimensions[col_idx].hidden:
ws.delete_cols(ws[col_idx + "1"].column)
wb.save("output_no_hidden.xlsx")Then run Docling on the cleaned file. This ensures only visible data is exported. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to configure docling to export from xlsx without hidden value ?
Beta Was this translation helpful? Give feedback.
All reactions