I need to generate a ms-word document from a pl/sql query to export a set of reports through a web browser.
I have been searching for a specific way to modify the content headers using owa_util.mime_header etc etc but could not really get a working proof of concept to get the web page to present the user to download/open/save a ms-word document.
I know it s not much but..
begin
OWA_UTIL.MIME_HEADER ( application/vnd.ms-word , false);
htp.print( Content-Disposition:attachment;filename="test.doc" );
OWA_UTIL.HTTP_HEADER_CLOSE;
for x in (select first_column, second_column from my_table)
loop
htp.p(x.first_column|| <br/> ||x.second_column|| <br/><br/> );
end loop;
end;
Could someone please shed some light on how can I create a procedure that generates output to html which intercept the browser headers and prints out the query content to a word document?
By the way, the current environment (restriction) I am running this from: Oracle APEX 3.0.1 (not 3.1, which I believe has an export to word doc feature).
Thanks in advance.