Can't get row.cells from table object
See original GitHub issueI’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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting value from table cell in JavaScript...not jQuery
Yes, the first line is using jQuery. The question explicitly states that they can't use jQuery. – Hoppeduppeanut. Jul 2, 2020 at 5:22....
Read more >Excel Table Column/Row Selection not working
The fix is to check the "select locked cells" box in order for the feature to return, whether the sheet is protected or...
Read more >HTMLTableElement.rows - Web APIs - MDN Web Docs
The read-only HTMLTableElement property rows returns a live HTMLCollection of all the rows in the table, including the rows contained within ...
Read more >HTML DOM Table cells Collection
Find out how many cells there are in the first row in a table: ... item(index), Returns the <td> and/or <th> element from...
Read more >Add or delete a table in Pages on Mac
In Pages on your Mac, add a new table, create a table from existing cells, copy and paste a table, or delete a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Glad you got it working 😃
What I did was open with Word and select “Open and Repair”. Then saved as new file and fix the issues. Thanks for the tip. I diffed the original file and new file (document.xml) and there are tons of differences. So I’ll have to take a look at the doc gen code we use and see how to apply the latest schema. Thanks for the help