Home » SQL & PL/SQL » SQL & PL/SQL » Data from database to word doc
Data from database to word doc [message #230502] Thu, 12 April 2007 02:40 Go to next message
srinivas.k2005
Messages: 404
Registered: August 2006
Senior Member
Hi,

I have to port the data from a database table to word document.
With formats.

Like i have table test:

A B
srinivas shetty
ram mohan

In word doc i should get the name in the middle of word doc with bold.

Now i am using VB code to get data from oracle database and display it on the word doc and format ,but it takes too much time .
(takes 30sec for one page)

Please let me know any built-in or tool which takes data from database and prints on word doc which takes less time.

Thanks,
Srinivas

Re: Data from database to word doc [message #230505 is a reply to message #230502] Thu, 12 April 2007 02:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
No, there is none.

Regards
Michel
Re: Data from database to word doc [message #230777 is a reply to message #230505] Thu, 12 April 2007 14:55 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
1.) create a sample document, and create place holders for variable text like #my_heading#, #to_name#, #from_name# #my_photo# etc...
2.) save file as .RTF
3.) Open the .RTF in notepad, copy the contents and save to a big column in a table or whatever.
4.) at runtime in pl/sql, retrieve the text and replace with your real values.

declare
 v_template varchar2(32767);
 v_heading varchar2(10) := 'A B';
 v_to_name varchar2(20) := 'srinivas shetty';
begin
 select col1 into v_template from my_tab;
 v_template := replace(v_template, '#my_heading#', v_heading);
 v_template := replace(v_template, '#to_name#', v_to_name);
end;
/



now v_template contains the final .RTF ready to save to file & print.
Re: Data from database to word doc [message #230946 is a reply to message #230777] Fri, 13 April 2007 09:01 Go to previous messageGo to next message
amarnathreddi.p
Messages: 4
Registered: March 2007
Junior Member
There is a built in package called DOM, Which helps to post data to msword...use that api...
Re: Data from database to word doc [message #230947 is a reply to message #230946] Fri, 13 April 2007 09:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Built-in?
SQL> select owner, object_name, object_type from dba_objects where object_name = 'DOM';

no rows selected

Where do you find it?

Regards
Michel
Re: Data from database to word doc [message #230948 is a reply to message #230947] Fri, 13 April 2007 09:12 Go to previous messageGo to next message
amarnathreddi.p
Messages: 4
Registered: March 2007
Junior Member
Sorry for that...

Follow the below steps

1) compile ordcom package (%ORACLE_HOME%\com\comwrap.sq)

2) compile ordword package (wordsol.sql )

3) use that api to write data to msword (worddemo.sql)

Using the above features u can get your task done


Re: Data from database to word doc [message #230949 is a reply to message #230948] Fri, 13 April 2007 09:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I don't have comwrap.sql anywhere.
I have a com directory and word*.sql but no comwrap.sql

Regards
Michel
Re: Data from database to word doc [message #230953 is a reply to message #230949] Fri, 13 April 2007 09:32 Go to previous messageGo to next message
amarnathreddi.p
Messages: 4
Registered: March 2007
Junior Member
Attached is the comwrap.sql

Regards,
Amarnath
  • Attachment: com.zip.zip
    (Size: 2.38KB, Downloaded 1450 times)
Re: Data from database to word doc [message #230954 is a reply to message #230502] Fri, 13 April 2007 09:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
May be refering to similar to this:
http://download-west.oracle.com/docs/cd/B19306_01/win.102/b14310/toc.htm

I am not a lawyer.
In some locations posting copyrighted or otherwise protected software would be by some considered to be illegal.

[Updated on: Fri, 13 April 2007 10:28] by Moderator

Report message to a moderator

Re: Data from database to word doc [message #230970 is a reply to message #230953] Fri, 13 April 2007 10:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Amarnath, my post didn't mean: send me the file (the file surely depends on the version) but how did you get it? What option did install?

Ana, thanks for the link.

Regards
Michel
Re: Data from database to word doc [message #230973 is a reply to message #230502] Fri, 13 April 2007 10:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://download-west.oracle.com/docs/cd/B19306_01/win.102/b14310/ch4plsql.htm#sthref217

implies the s/w exists but I have not found it on any of my systems so far

I'm still looking for it myself.
Re: Data from database to word doc [message #231370 is a reply to message #230973] Mon, 16 April 2007 16:04 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
>> I'm still looking for it myself.
Not on your unix boxes I hope...
Re: Data from database to word doc [message #231612 is a reply to message #231370] Tue, 17 April 2007 12:57 Go to previous messageGo to next message
srinivas.k2005
Messages: 404
Registered: August 2006
Senior Member
Ana thanks for the link .
I went through the procedure .
1) compile ordcom package (%ORACLE_HOME%\com\comwrap.sq)

2) compile ordword package (wordsol.sql )

3) use that api to write data to msword (worddemo.sql)


I am getting the following error when i run worddem.sql

SVRMGR> @worddem.sql
Server Output ON
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "QUOTE.OACREATE", line 0
ORA-06512: at "QUOTE.ORDCOM", line 263
ORA-06512: at "QUOTE.ORDWORD", line 20
ORA-06512: at line 16
Creating Word application...

TNSname.ora

extproc_connection_data.world = (
(DESCRIPTION =
(ADDRESS =
PROTOCOL=tcp) (HOST=10.10.10.22) (PORT=1521)
CONNECT_DATA = (SID=extproc))

listner.ora

# LISTENER.ORA Network Configuration File: C:\oracle\ora81\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRINIVASREDDY)(PORT = 1521))
)
)
(DESCRIPTION =
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = SRINIVASREDDY)(PORT = 2481))
)
)

#LISTENER =
# (ADDRESS_LIST =
# (ADDRESS=
# (PROTOCOL= IPC)
#(KEY= EXTPROC0)
#)
#)
#STARTUP_WAIT_TIME_LISTENER = 0
#CONNECT_TIMEOUT_LISTENER = 10
#TRACE_LEVEL_LISTENER = OFF

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\ora81)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = quote.cisgi.com)
(ORACLE_HOME = C:\oracle\ora81)
(SID_NAME = quote)
)
)

#SID_LIST_LISTENER =
# (SID_LIST=
# (SID_DESC=
# (SIDNAME=ORCL)
# )
# (SID_DESC=
# (SID_NAME=extproc) (PROGRAM=extproc)
# )
#)

Thanks,
Srinivas
Re: Data from database to word doc [message #231641 is a reply to message #230502] Tue, 17 April 2007 15:59 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Metalink Note:264516.1 has resolution
Re: Data from database to word doc [message #231659 is a reply to message #231641] Tue, 17 April 2007 23:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Ah! Just 3 documentation bugs for an exemple, Oracle is getting better! Evil or Very Mad

Thanks for the doc number.

Regards
Michel
Re: Data from database to word doc [message #428224 is a reply to message #230502] Tue, 27 October 2009 09:12 Go to previous messageGo to next message
serpini
Messages: 2
Registered: April 2009
Junior Member
Hello.

Can someone attach this files?
- $ORACLE_HOME\bin\orawpcom.dll? or $ORACLE_HOME\bin\orawpcomVER.dll
- $ORACLE_BASE\ORACLE_HOME\com\demos\exceldem.sql
- $ORACLE_BASE\ORACLE_HOME\com\demos\excelsol.sql

The most important for me is the dll.

Thanks!

[Updated on: Tue, 27 October 2009 09:13]

Report message to a moderator

Re: Data from database to word doc [message #428246 is a reply to message #428224] Tue, 27 October 2009 09:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
If they are copyrighted files, the answer is no.

Regards
Michel
Re: Data from database to word doc [message #428248 is a reply to message #428224] Tue, 27 October 2009 09:49 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
If you need part of the Oracle software bundle, I would suggest asking Oracle for it.
Re: Data from database to word doc [message #428443 is a reply to message #230502] Wed, 28 October 2009 06:37 Go to previous messageGo to next message
serpini
Messages: 2
Registered: April 2009
Junior Member
Hi, i install COM by universall installer and i get it, ORDCOM is ok.
Re: Data from database to word doc [message #440779 is a reply to message #428224] Wed, 27 January 2010 00:22 Go to previous messageGo to next message
tavinderp
Messages: 4
Registered: January 2010
Junior Member
Hi,

Did you get the files now. If yes, please can you attach here...

Many Thanks in advance.

Best Regards,
Tavinder Pal Singh
Re: Data from database to word doc [message #440788 is a reply to message #440779] Wed, 27 January 2010 00:47 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
tavinderp wrote on Wed, 27 January 2010 07:22
Hi,

Did you get the files now. If yes, please can you attach here...

Many Thanks in advance.

Best Regards,
Tavinder Pal Singh

Frank wrote on Tue, 27 October 2009 15:49
If you need part of the Oracle software bundle, I would suggest asking Oracle for it.

Re: Data from database to word doc [message #440822 is a reply to message #230502] Wed, 27 January 2010 03:37 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
While we're necro-posting, Oracles new BI Publisher includes an interface that allows you to feed query results from the DB straight into Word documents.

I have no idea how it works.
Previous Topic: excelsol.sql file
Next Topic: grouping in ordinal way...
Goto Forum:
  


Current Time: Thu Dec 05 07:41:54 CST 2024