Data from database to word doc [message #230502] |
Thu, 12 April 2007 02:40 |
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 #230777 is a reply to message #230505] |
Thu, 12 April 2007 14:55 |
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 #230948 is a reply to message #230947] |
Fri, 13 April 2007 09:12 |
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 #231612 is a reply to message #231370] |
Tue, 17 April 2007 12:57 |
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 #440788 is a reply to message #440779] |
Wed, 27 January 2010 00:47 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
tavinderp wrote on Wed, 27 January 2010 07:22Hi,
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:49If 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 |
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.
|
|
|