[Tutor] python script

Alan Gauld alan.gauld at btinternet.com
Fri Feb 20 09:50:47 CET 2015


On 20/02/15 03:56, rohit poddaturi wrote:
>  The program runs through the word  document and when it sees a date
 > ( the date might be in a variety of forms, but will always list the 
particular month)
 >  it goes to a new row  in the excel sheet and lists that date.

OK, The first question that springs to mind is "How are you accessing 
the Word and Excel files?
They are not a native format that Python can easily read so you need 
some kind of library to work with them. Do you already have such a 
library or do you need to find one?

 > Then it searches for a key word. If that key word appears before
 > the next date in the document, then it lists it as a '1' in
> the excel sheet.If that key word does not appear before the
 > next date listed then it writes down a '0’.

The same applies for writing to Excel, you need a library to do that. Do 
you have one already?

Also which Python version are you using?
I'll assume you are running Windows since it is Word and Excel based?

> I am attaching a sample document and excel output for reference. Kindly look into it

Your attachments didn't show up. Can you put them on a web site somewhere?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list