Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Generating excel(xls) using plsql

UtsavMay 28 2013 — edited Sep 20 2013
Hi,

I have a requirement in which my procedure is dumping data into a final table TBL_REPORT, Now data inside this table has to be shared with end users in excel (xls) format.
Is there any utility file or plsql program which can fulfill this requirement, guidance will be much appreciated.

version Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit PL/SQL Release 11.2.0.3.0+

Thanks in advance,
Prashant

Edited by: Prashant on May 28, 2013 6:02 PM
This post has been answered by KPR on May 28 2013
Jump to Answer

Comments

Bernhard FW
Bernhard FW

in short:

A) from within a form - add procedure of type "Send_email" and use substitutions/placeholders like &P1_NAME. or &P1_EMAIL. in the UI properties... - this is one email as per page/data

Send_email.PNG

B) loop thru records of a table and send emails to those records like: - this is: several emails in a row....

FOR m IN (SELECT VORNAME, NACHNAME, EMAIL

        FROM TABLE

Where email is not null

      and status = 'Aktiv'

and ABTEILUNG like '%'||:P3_ABTEILUNG

      )

LOOP

apex_mail.send( p_to => m.EMAIL,

              p\_from => 'info@my\_email.de',

              p\_bcc => 'info2@my\_2nd\_email.com',

              p\_body => 'Hallo '||m.vorname||','||chr(10)||chr(10)||:P3\_TEXT||chr(10)||

            :P3\_SIGNATURE               

            ,

              p\_subj => :P3\_SUBJECT

            );

end loop;

:P3_TEXT, :P3_SIGNATURE, :P3_SUBJECT and :P3_ABTEILUNG are names of fields in page 3 - in SQL and pl/sql these types of substitutions are used... in the Procedure re A) "Send_email" UI we use substitutions of type: &P3_NAME.

Hope that helps

Scott Wesley

This is a poorly worded question to a topic that's widely talked about, and has a built-in API.

https://docs.oracle.com/database/apex-5.1/AEAPI/APEX_MAIL.htm#AEAPI341

ps - there is no APEX 5.2

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 18 2013
Added on May 28 2013
16 comments
158,437 views