Python Forum
Data extraction from (multiple) MS Word file(s) in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data extraction from (multiple) MS Word file(s) in python
#5
Damn, I see that i'm really making a beginner-mistake here.
I tried something new that gave me some output already but it's still not what it's suposed to be:

The definition of the getText function stays thesame and after that I wrote this:
def main():
    print("the main is executed")
    t = getText('paragraphtest.docx')
    print(t)


main()
this gives me as output:
Quote:The main is executed
This is paragraph 1.

While the paragraphtest.docx is actualy a document with this text inside:
Quote:This is paragraph 1.
This is paragraph 2.
This is paragraph 3.

(I made it just to test if there isn't something wrong with the word-document I'm using itself)

It looks like there's something wrong with the word documents which I'm supposed to use as input. Originaly they are .doc files that I'm supposed to automaticly convert to .docx files. The automaticly-part of that is something that took me a while to figure out how to do it so to save time I did a manual conversion but... I guess that is where something went wrong :/
But anyway, I'm wondering why getText only prints one paragraph for me now.

(using pycharm btw)
Reply


Messages In This Thread
RE: Data extraction from (multiple) MS Word file(s) in python - by Den0st - Sep-16-2019, 11:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Read data from a CSV file in S3 bucket and store it in a dictionary in python Rupini 3 7,136 May-15-2020, 04:57 PM
Last Post: snippsat
  Multiple XML file covert to CSV output file krish143 1 3,411 Jul-27-2018, 06:55 PM
Last Post: ichabod801
  Login Module Help - Comparing data in a text file to data held in a variable KeziaKar 0 2,291 Mar-08-2018, 11:41 AM
Last Post: KeziaKar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020