I am trying to extract the contents of tables in a DOCX Word document, and as a boy I am new to xml / xpath.
from docx import *
document = opendocx('someFile.docx')
tableList = document.xpath('/w:tbl')
This throws an XPathEvalError: Undefined error. I am sure this is only the first one to expect when developing a script. Unfortunately, I could not find a tutorial for python-docx .
Could you provide an example of retrieving a table?
source
share