Merge branch 'master' of github.com:mortenbra/alexandria-plsql-utils

This commit is contained in:
Morten Braten 2018-10-03 20:04:16 +02:00
commit c121c58480
3 changed files with 17 additions and 11 deletions

View File

@ -260,6 +260,7 @@ is
l_hdr_value varchar2(1024);
l_hdr header;
l_hdrs header_table;
l_returnvalue xmltype;
begin
-- determine database characterset, if not AL32UTF8, conversion will be necessary
@ -389,13 +390,17 @@ begin
end;
utl_http.end_response(l_http_resp);
begin
l_returnvalue := xmltype.createxml( l_clob );
exception when others then
if sqlcode = -31011 then -- invalid xml
raise_application_error( -20001, 'HTTP response could not be converted to XML. Response was (first 1000 characters): ' || dbms_lob.substr( l_clob, 1000 ));
end if;
end;
dbms_lob.freetemporary( l_clob );
return xmltype.createxml(l_clob);
exception when others then
if sqlcode = -31011 then -- its not xml
return null;
end if;
return l_returnvalue;
end make_request;
function make_rest_request(

View File

@ -1,5 +1,5 @@
CREATE OR REPLACE package body xlsx_builder_pkg
as
as
--
c_LOCAL_FILE_HEADER constant raw(4) := hextoraw( '504B0304' ); -- Local file header signature
c_END_OF_CENTRAL_DIRECTORY constant raw(4) := hextoraw( '504B0506' ); -- End of central directory signature
@ -1624,9 +1624,9 @@ ts timestamp := systimestamp;
loop
t_xxx := t_xxx || '<autoFilter ref="' ||
alfan_col( nvl( workbook.sheets( s ).autofilters( a ).column_start, t_col_min ) ) ||
nvl( workbook.sheets( s ).autofilters( a ).row_start, workbook.sheets( s ).rows.first() ) || ':' ||
to_char( nvl( workbook.sheets( s ).autofilters( a ).row_start, workbook.sheets( s ).rows.first() )) || ':' ||
alfan_col( coalesce( workbook.sheets( s ).autofilters( a ).column_end, workbook.sheets( s ).autofilters( a ).column_start, t_col_max ) ) ||
nvl( workbook.sheets( s ).autofilters( a ).row_end, workbook.sheets( s ).rows.last() ) || '"/>';
to_char( nvl( workbook.sheets( s ).autofilters( a ).row_end, workbook.sheets( s ).rows.last() )) || '"/>';
end loop;
if workbook.sheets( s ).mergecells.count() > 0
then
@ -1694,7 +1694,7 @@ ts timestamp := systimestamp;
t_xxx := t_xxx || '<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>';
if workbook.sheets( s ).comments.count() > 0
then
t_xxx := t_xxx || '<legacyDrawing r:id="rId' || ( workbook.sheets( s ).hyperlinks.count() + 1 ) || '"/>';
t_xxx := t_xxx || '<legacyDrawing r:id="rId' || to_char( workbook.sheets( s ).hyperlinks.count() + 1 ) || '"/>';
end if;
--
t_xxx := t_xxx || '</worksheet>';
@ -1949,6 +1949,7 @@ style="position:absolute;margin-left:35.25pt;margin-top:3pt;z-index:' || to_char
then
dbms_sql.close_cursor( t_c );
end if;
raise;
end;
end xlsx_builder_pkg;
/

View File

@ -1,5 +1,5 @@
create or replace package xlsx_builder_pkg
as
authid current_user as
/**********************************************
**
** Author: Anton Scheffer