Yashwanth Nataraj
Yashwanth Nataraj

Reputation: 193

is it possible to create table in word using python and writing results into it?

First of all thanks stackoverflow users. I got to know how i can write result into a file.

          with open('Output\\Result.doc', 'a') as fout:
                 result = str(args[0]) + " : Fail"
                 fout.write("\n")
                 fout.write(result)

Now, i wanted to know is it possible to create a table in word doc using python and writing result into it.?or if the table exists, how can i write result into it? first result 1 row and columns , second result 2 row and column so on.

Upvotes: 2

Views: 8627

Answers (1)

perreal
perreal

Reputation: 97948

I think the easiest way is to create the table as an html file.

Also see: How can I create a Word document using Python?, Extracting data from HTML table

Upvotes: 2

Related Questions