Skip to Main Content
  • Questions
  • Import data from oracle into word#s template field

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Vannessa.

Asked: April 07, 2017 - 1:44 pm UTC

Last updated: December 01, 2017 - 2:52 am UTC

Version: oracle express edition 11g

Viewed 1000+ times

You Asked

Hello,
i want to know how i can import data from oracle ( not a full table just specific information) and then fill MS Word's template field with this data.
Have you any idea how i realize that?
thanks for the answer.

and Connor said...

Take a look here

https://support.office.com/en-us/article/Use-a-table-or-query-as-a-mail-merge-data-source-860ef4bc-e793-4004-8a1b-5c8a34c7e89d?ui=en-US&rs=en-US&ad=US&fromAR=1

It talks about using MS Access to provide data to a word document. But that access is done via ODBC, so you should be able to create an ODBC end point to your Oracle database and achieve the same thing.

Rating

  (1 rating)

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

Comments

Import Oracle data into word template

Murthy, November 29, 2017 - 5:51 am UTC

For following reasons I believe this solution is just good enough but not elegant.

1. This introduces one more step - creating and populating access database

2. Mail merge wizard itself has lot of limitations. For example. it doesn't support population of multiple rows into a single document

I propose the following solution.

1. Create XML from SQL query using XMLElement
2. Populate that XML into MS Word template using document generation tools

The whole process can be automated by integrating with REST APIs of document generation software.


Connor McDonald
December 01, 2017 - 2:52 am UTC

If I was going for a full blown solution I'd possibly look at BI Publisher as well

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library