Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question
2  
Why are you writing to a table in a Word doc? Writing a CSV is practically trivial in Python, .docx is almost certainly harder (especially for tables), and I'm guessing .doc is substantially harder than that. –  Kyle Strand May 8 '13 at 3:58

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.