I want to add multiple tables in MS word using python. I am trying the following code:
i=0
while i < 9:
f=open("file", "a+")
document = Document()
table[i] = document.add_table(rows=5, cols=4)
i=i+1
document.save('file')
When I open the document, however, there is only one table.