Hi,
i used that code to export a single Page in an APEX Application. I run that code on Submit in APEX
begin
sys.htp.init;
wwv_flow.g_page_text_generated := true;
APEX\_190100.wwv\_flow\_gen\_api2.g\_mime\_shown := true;
wwv\_flow\_utilities.print\_download\_header(
p\_mime\_type => 'application/x-sql',
p\_file\_name => 'f'||100||'\_page\_'||1||'.sql',
p\_is\_attachment => true
);
sys.owa\_util.http\_header\_close;
APEX_190100.wwv_flow_gen_api2.export(
p\_flow\_id=>to\_number(100),
p\_page\_id=>to\_number(1),
p\_commit=>'YES',
p\_flashback\_min\_ago=>1200);
wwv_flow.g_page_text_generated := true;
wwv_flow.g_unrecoverable_error := true;
sys.dbms_flashback.disable;
end;
It works well . However, when using this code in SQL Plus I have the following errors
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 354
ORA-06512: at "SYS.HTP", line 1362
ORA-06512: at "SYS.HTP", line 1438
ORA-06512: at "APEX_190100.WWV_FLOW_RESPONSE", line 452
ORA-06512: at "APEX_190100.WWV_FLOW_RESPONSE", line 468
ORA-06512: at "APEX_190100.WWV_FLOW_RESPONSE", line 108
ORA-06512: at "APEX_190100.WWV_FLOW_RESPONSE", line 321
ORA-06512: at "APEX_190100.WWV_FLOW_RESPONSE", line 775
ORA-06512: at "APEX_190100.WWV_FLOW_UTILITIES", line 11941
ORA-06512: at line 5
I want to use that code to make a script to automatically export single APEX Page.
It seem to be working in APEX as show in screenshot

How to put that ouput in a file.sql in sqlplus?
Thanks