0

I would like to save some tables in word document to CSV file or Excel doesn't matter. I tried to "readlines()" it doesn't work! I don't know know.

Tables in word document are like this..

Name Age Gender
Alex  12  F
Willy 14 M
.
.
.

However, I would like to save this table in the same row.. I mean that.. I would like to save in CSV or Excel File

Alex 12 F Willy 14 M ....
 import win32com
 word = win32com.client.Dispatch('Word.Application')
 f=word.Documents.Open('C:/3.doc')

1 Answer 1

2

have a look to www.ironpython.com: it runs over .NET so it has all the libraries to access to the Microsoft world. For your case, read this small tutorial about convert a .doc to a .txt file. It should be very useful for you:

http://www.ironpython.info/index.php/Converting_a_Word_document_to_Text

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.