Skip to Main Content
  • Questions
  • How are we suppose to go about printing by pdf and excel format in Oracle 7.3

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Prashanth.

Asked: July 22, 2001 - 9:38 pm UTC

Last updated: April 30, 2008 - 12:58 pm UTC

Version: Oracle7 Server Release 7.3.4.4.0

Viewed 1000+ times

You Asked

Hi Tom

I am using Oracle Web server3.0 Our Database is Oracle 7.3 with PL/SQL Release 2.3.4.4.0 and Unix 5.0

My requirement is i need to convert the output of a select statement to be displayed as PDF or EXCEL
for the user to display on the web or give an option to down load the same if he dosent have one.

I tried out as below. But the browser responds with an alert "Document contains no data"

owa_util.mime_header( 'application/pdf' );
for x in ( select empno, ename from emp ) loop
htp.p( x.empno || chr(9) || x.ename );
end loop;

I exactly am not aware as how i am to proceed to get the queried result on to the above formats.

It would be very much helpful if you give me a detail process, as you do give for the other queries.

If you think i am supoose to shed out more details then do write back to me. I am just relying on the solution that you are going to give. As i have searched your other Question and i was not able to get a topic that was of this requirement.

Thanks a lot. Shall be waiting for an early reply


Prashanth B S

and Tom said...

You would need to fully understand the entire PDF file format and generate a valid PDF file.

Open a PDF file in an editor sometime, you'll see it looks very strange. It is not just text.

To get PDF out of the database, I would recommand you use Oracle Reports. It is a tool that can generate PDF for you.

As for getting into EXCEL. Search my website for "owa_sylk" it does this.

Rating

  (2 ratings)

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

Comments

OWA_SYLK

Prashanth, June 22, 2006 - 7:01 am UTC

Thanks for the excellent Package, just a few clarifications

I am using the WEB version of owa_sylk

1) where is the excel sheet stored and with what name?
2) how can i bold the column headings in the excel using owa_sylk
3) how can i get it stored to the directory of my choice like c:\prashant...

Tom Kyte
June 22, 2006 - 12:33 pm UTC

1) no where, it is sent to the browser, browser decides where to put it.

2) google about for sylk - industry standard file format, documented.

3) web question - depends on browser.

PDF into Oracle Database

Dawar, April 30, 2008 - 12:32 pm UTC

Hello Tom,

We have our salary report listed on our internet.
This report is in PDF format.

I need to load few columns in our Oracle Database table.

How???
Can we load PDF into Oracle?
OR
I would like to convert PDF into MS Excel or Access then load into Oracle DB.
I tried as below but not getting correct format.
I saved PDF file in the txt format and open from MS excel.
But not getting correct format or values.

Other option in my opinion could be to use Oracle Report Builder.
Currently I am converting Oracle report into PDF or Excel format via Report builder.
I s there any way to convert PDF file into excel via Oracle Report Module.

Thanks
Dawar

Tom Kyte
April 30, 2008 - 12:58 pm UTC

this would be a question for someone that reads pdf.

what company do you work for - I want to know just so I never consider working with them. Putting my salary information into a pdf file and posting it on a web site - oh my gosh.