29 Mart 2018 Perşembe

Custom CSV download with an AJAX Callback


You can find custom CSV download steps below. (Without submit)

The button to download.


Ajax Callback process in the page.




(Type Ajax Callback) Process body is ;

begin
htp.p('Content-type: text/csv');
htp.p('Content-disposition: attachment;filename=ledger.csv');
owa_util.http_header_close;

htp.p('"Emp No","Emp Name"');

for i in (
select empno, ename
  from emp)
    loop
      htp.p('"'||i.empno||'","'||i.ename||'"');
    end loop;
end;

Hiç yorum yok:

Yorum Gönder