Skip to content

Can't get row.cells from table object #1005

@u84six

Description

@u84six

I'm trying to iterate over tables to get the text from each of the cells, but after getting the rows of the table and iterating over each row, row.cells is throwing an exception:

docx.oxml.exceptions.InvalidXmlError: required <w:tblGrid> child element not present

I've looked in document.xml file and noticed that it doesn't have w:tblGrid. Is this incompatible? Or is there another way I can get to the values of each cell? The hierarchy is: w:tbl -> w:tr -> w:tc -> w:p -> w:r -> w:t <- this is where the value is in the first cell of the first row

I'm just trying to figure out if this file I'm parsing is compatible or not.

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