Oracle apex 设置报表导出的列标题
我正在使用下面的博文来帮助我导出报告。它工作得很好,但是我想知道是否可以设置列标题名称Oracle apex 设置报表导出的列标题,oracle-apex,Oracle Apex,我正在使用下面的博文来帮助我导出报告。它工作得很好,但是我想知道是否可以设置列标题名称 如果您只想提供一个包含列标题的初始行: begin -- Set the MIME type owa_util.mime_header( 'application/octet', FALSE ); -- Set the name of the file htp.p('Content-Disposition: attachment; filename="emp.csv"'); --
如果您只想提供一个包含列标题的初始行:
begin
-- Set the MIME type
owa_util.mime_header( 'application/octet', FALSE );
-- Set the name of the file
htp.p('Content-Disposition: attachment; filename="emp.csv"');
-- Close the HTTP Header
owa_util.http_header_close;
-- Send the initial row with headers
htp.prn('Ename,Empno,Department'||chr(13));
-- Loop through all rows in EMP
for x in (select e.ename, e.empno, d.dname
from emp e, dept d where e.deptno = d.deptno
and e.deptno like :P1_DEPTNO)
loop
-- Print out a portion of a row,
-- separated by commas and ended by a CR
htp.prn(x.ename ||','|| x.empno ||','||
x.dname || chr(13));
end loop;
-- Send an error code so that the
-- rest of the HTML does not render
--htmldb_application.g_unrecoverable_error := true;
--use stop apex_engine
apex_application.stop_apex_engine;
end;
基本上,您只需在发出数据行之前发出一个额外的行
我评论了
htmldb\u应用程序
,支持apex\u应用程序。停止apex\u引擎
我只是复制粘贴了代码并运行了它,它给了我额外一行的csv。不知道你是怎么把那一排都分开的。如果更改了数据行的逗号,是否更改了它们?当你下载文件或分割文本时,你什么时候会得到额外的行?这是因为我在每个列名的末尾点击了return,我现在就这样做了,效果很好。谢谢:-)