Python Forum
python word-docx - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: python word-docx (/thread-4654.html)



python word-docx - jon0852 - Sep-01-2017

Hi, I am working with the python library python-docx and trying to extract information from a MS Word table and place it neatly in Excel. The table consists of two columns but some cells are merged. For instance, the first row in the table might have one large spanning cell in the left column and in the right-hand column, there might be 2 or 3 sub-rows for that one spanning cell on the left. Is there a way to have a link between the two? For example, I want to search for a certain criteria in the column on the right, find it, then get the corresponding information in the left-hand column. Is there a way to keep track of the row,column indices or something of that nature? Any help is much appreciated. Thank you very much.