Hi,
I am currently on APEX 20.2.
I am trying to parse an XLSX file using APEX_DATA_PARSER.PARSE utility.
This is how I am trying to accomplish this:
DECLARE
l_blob BLOB;
l_filename VARCHAR2 (1000);
l_context apex_exec.t_context;
l_parameters apex_exec.t_parameters;
BEGIN
SELECT blob_content, filename
INTO l_blob, l_filename
FROM blob_table;
apex_exec.ADD_PARAMETER (l_parameters, 'blob', l_blob);
apex_exec.ADD_PARAMETER (l_parameters, 'filename', l_filename);
l_context :=
apex_exec.open_query_context (
p_location => apex_exec.c_location_local_db,
p_sql_query => q'#SELECT *
FROM TABLE(
APEX_DATA_PARSER.parse(
p_content => :blob,
p_file_name => :filename
))#',
p_sql_parameters => l_parameters);
apex_json.open_object;
apex_json.write_context (p_name => 'results', p_context => l_context);
apex_json.close_object;
END;
The response is
sqlerrm:ORA-06553: PLS-306: wrong number or types of arguments in call to 'PARSE'
However, if I use APEX_DATA_PARSER.parse outside APEX_EXEC call, this works fine without issues.
Also the above code works fine in latest APEX 21.1 (on apex.oracle.com)
I am wondering if this is a known issue? If yes, is there any workaround or patch available?
Thankyou.
-- Toufiq