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.

How to attach an image in xls report

739257Dec 6 2009 — edited Dec 6 2009
Hi, does anyone knows how to insert an image in excel report?..
We'd been working this for so long and it seems that the report cannot locate/render the image properly ..
I hope someone can give me some tips and help..
Thanks ..



--original sql code TEXT format
OWA_UTIL.MIME_HEADER('application/vnd.ms-excel', TRUE, 'MaGiC_KeY');
HTP.P('Content-Disposition: attachment; filename="' || V_RPT_TITLE_NO_SPACE || '.xls"');
OWA_UTIL.HTTP_HEADER_CLOSE;
--end of original sql code

--begin DEV mode Insert Image - Logo
--OWA_UTIL.MIME_HEADER('application/vnd.ms-excel', TRUE, 'MaGiC_KeY');
owa_util.mime_header( 'application/octet-stream', FALSE );
htp.p('Content-Type: application/ms-excel');
HTP.P('Content-Type: multipart/related; boundary="----=_NextPart_01CA74F8.C8882F00"');
HTP.P('------=_NextPart_01CA74F8.C8882F00');
htp.p('Content-Disposition: attachment; filename="filename.xls"');
-owa_util.http_header_close;
--end DEV mode



base64 code (image)

HTP.P('------=_NextPart_01CA74F8.C8882F00
Content-Location: file:image001.jpg
Content-Transfer-Encoding: base64
Content-Type: image/jpeg

/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAUAAA/+4ADkFkb2JlAGTAAAAAAf/b
AIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBg.....')

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 3 2010
Added on Dec 6 2009
1 comment
644 views