Skip to content

Can't get acess to the table in .docx file through python-docx api. #488

@alexbalandi

Description

@alexbalandi

Hello!

I've made a minimal example of docx file, containing a single table with the formatting I faced in a real document. When I try:
test_doc = docx.Document('non_readable_table.docx')
print(test_doc.tables)
I get an empty list. All paragraphs are also empty. I'm not exactly familiar with xml stuff, that's why I use python-docx as some high-level api for the document so I can't really figure what's the problem here. I'm sorry in advance if this is not the issue with the library, but with my own skills.

I tried iterating over all objects as suggested here but to no avail: it yeilds a list of empty paragraphs and nothing more.
I attach the minimal example .docx file.
non_readable_table.docx

What is the correct way to handle such tables within python-docx api (if there is one)?

Regards,

Alex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions