Sign in to follow this  
Followers 0
murky024

Help With Parsing Data From Word File

3 posts in this topic

Ok, so I am writing an AutoIt script to:

  • Loop through and create an array of valid documents to open and parse through
  • Parse through each document one by one and take the values stored and post them to a web page
  • Move files once completed
  • Update log file of completed documents
I think I have a good grasp on everything BUT the parsing through Word files. I have an audit report file that I have built as a standard template and my auditors are filling out these files with the number of items they discover. I want to take this from Word and copy the information to a web page. (All this work is to current manual steps being done by 50+ people to save time and effort, I have what I have to work with...)

I have searched for a while but I cannot find exactly what I am looking for. I am able to open the .docx files with the Word.au3 and some extra code I found on here but now I want to search for specific tags and tables to pull data.

Thanks for the help in advance,

Mark

(please be patient with me as I just picked up AutoIt yesterday and started using it...)

Share this post


Link to post
Share on other sites



Maybe you can find a way how to copy whole document to *.ini file and AutoIt has great support of this format.

Or you can convert documents to *.txt files (that cause you lose visual formation of text in document, but not the content) which are much better to work with. When you convert them, than you just have to play with StringInStr, StringLeft, StringRight and other String related functions.

Personally, I think that your whole problem (of getting data and publish them on web) can be done more effectively using PHP and MySQL.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Maybe you can find a way how to copy whole document to *.ini file and AutoIt has great support of this format.

Or you can convert documents to *.txt files (that cause you lose visual formation of text in document, but not the content) which are much better to work with. When you convert them, than you just have to play with StringInStr, StringLeft, StringRight and other String related functions.

Personally, I think that your whole problem (of getting data and publish them on web) can be done more effectively using PHP and MySQL.

I would agree that ideally there would be better options. The problem is that the web page I need to publish to is a SAS model and does not offer any APIs for transporting data beyond anything but their front end.

I might end up writing a Word macro to parse the data out I need into a text file. It isn't ideally what how I wanted it to work but this is anything but ideal. Thanks for the advice and if anyone thinks of any crafty ideas on how else to solve the problem please let me know.

Thanks,

Mark

Edited by murky024

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0