Part of this included Excel generation from PL/SQL, in the past in my own code I've headed down the route of using XML Spreadsheets however one of the previous developers managed to format the data into a proper XSL formatted spreadsheet using Data Interchange Format (DIF).
One of the issues I was having though is the generated file was being named after the PL/SQL package and process name (package.process), it was missing all the nice MIME information. So for reference this is how you should be structuring your basic Excel MIME header in PL/SQL:
owa_util.showpage;Line 2: Mime header has False defined so the header isn't closed
owa_util.mime_header('application/excel',False);
htp.print('Content-Disposition:attachment;filename="NAME_HERE.XLS"');
owa_util.http_header_close;
Line 3: Defines the file name
Line 4: Closes off the header, important because you left it open on line 2
No comments:
Post a Comment