I am a newbie and I started learning Python on my own by seeing videos. I have a task to read table from word document using python and populate it to database.
I can able to write the code to read the paragraphs by using the below code. Can anyone please guide me how to write the code for reading the table form word document? Thanks
import docx
doc = docx.Document('Text.docx')
doc.paragraphs
doc.paragraphs[0].text
doc.paragraphs[1].text
Samlpe table:
Heading Name1 Desc1 Desc1 Desc2 Name3 Desc3 Name4 Desc4 Desc1 Desc5 Name6 Desc6 Name7 Desc7
I tried writing code to read paragraphs but I am searching how to write the code to read the table