Skip to Main Content
  • Questions
  • How Do I Export Data From A MS Word Document Using PL/SQL?

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Lee.

Asked: October 09, 2006 - 10:20 am UTC

Last updated: October 10, 2006 - 12:10 pm UTC

Version: 9

Viewed 1000+ times

You Asked

I currently have multiple MS Word Documents. The Data within each of the word documents is required to be entered into an Oracle table.

How do I export the data from an MS Word document using PL/SQL?

For example I have the following Paragraph in a word document:

"Hello this is John. I enjoy my hobbies alot, especially playing football and going out with my mates to relax and talk."

There will be multiple paragraphs in one document to be export to a table.

How can I get the paragraghs out of a Word Document and insert it into a table?

Thanks
Lee

and Tom said...

Oracle Text can be used to convert the binary data in a MS word document to text

</code> http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:25695084847068 http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:69507712963043 <code>

You will have to write plsql to parse and interpret that text of course, it is just a big text document after that.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Multiple Documents

Lee Kirwan, October 10, 2006 - 6:12 am UTC

Tom I actually have multiple Word Documents. Most of the documents are just text from what I have looked through, but I did come across one of the documents that has a table displayed in it. That may give me a problem. The main objective at the minute is to get all the text from the document into an Oracle system. Some data may appear corrupte, but when the transfer is complete all data will be edited manually to make sure all has tranfered correctly.

Thanks
Lee

Tom Kyte
October 10, 2006 - 8:18 am UTC

if you have a word document, you have a binary file, it is not just text.

maybe they only have words in them, but it is still a binary file.


what is the goal here - "getting all of the text in" is not a goal, it is a "solution" perhaps to some goal.

what do you need to do with this stuff? search it? what?



What Needs To Be Done

Lee Kirwan, October 10, 2006 - 9:26 am UTC

Tom
The data taken from the word file will be entered into an Oracle system. Within the Oracle system the data will be searched for by users so they can read the information in different sections.

Regards
Lee

Tom Kyte
October 10, 2006 - 12:10 pm UTC

why not leave it in word and just INDEX it???

do you know about Oracle Text?

lee kirwan

lucy, December 04, 2006 - 5:38 am UTC

is this dominic kirwans son (lee kirwan.