From ae0bbbf11c92d6edf030243be40a069b690b8e54 Mon Sep 17 00:00:00 2001 From: eaolson Date: Sun, 17 Jun 2018 13:53:58 -0500 Subject: [PATCH 1/4] Add to_char --- ora/xlsx_builder_pkg.pkb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ora/xlsx_builder_pkg.pkb b/ora/xlsx_builder_pkg.pkb index 8f4ad26..892ad3e 100755 --- a/ora/xlsx_builder_pkg.pkb +++ b/ora/xlsx_builder_pkg.pkb @@ -1694,7 +1694,7 @@ ts timestamp := systimestamp; t_xxx := t_xxx || ''; if workbook.sheets( s ).comments.count() > 0 then - t_xxx := t_xxx || ''; + t_xxx := t_xxx || ''; end if; -- t_xxx := t_xxx || ''; From 8b7488fa5b0bdf8affa6c994e207440d6dd84b2c Mon Sep 17 00:00:00 2001 From: eaolson Date: Sun, 17 Jun 2018 14:12:54 -0500 Subject: [PATCH 2/4] Fix issue 35 --- ora/xlsx_builder_pkg.pkb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ora/xlsx_builder_pkg.pkb b/ora/xlsx_builder_pkg.pkb index 892ad3e..4811b24 100755 --- a/ora/xlsx_builder_pkg.pkb +++ b/ora/xlsx_builder_pkg.pkb @@ -1624,9 +1624,9 @@ ts timestamp := systimestamp; loop t_xxx := t_xxx || ''; + 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 From 30cc22719b3a41ae74a1f92e7b9d8972005755ae Mon Sep 17 00:00:00 2001 From: eaolson Date: Sun, 17 Jun 2018 14:26:12 -0500 Subject: [PATCH 3/4] Fix issue52 xlsx_builder_pkg will be invoker rights --- ora/xlsx_builder_pkg.pkb | 3 ++- ora/xlsx_builder_pkg.pks | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ora/xlsx_builder_pkg.pkb b/ora/xlsx_builder_pkg.pkb index 8f4ad26..f5d94ec 100755 --- a/ora/xlsx_builder_pkg.pkb +++ b/ora/xlsx_builder_pkg.pkb @@ -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 @@ -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; / diff --git a/ora/xlsx_builder_pkg.pks b/ora/xlsx_builder_pkg.pks index 67f922e..bf656d0 100755 --- a/ora/xlsx_builder_pkg.pks +++ b/ora/xlsx_builder_pkg.pks @@ -1,5 +1,5 @@ create or replace package xlsx_builder_pkg -as +authid current_user as /********************************************** ** ** Author: Anton Scheffer From af005d4e06a1929e6564f22ea6a4fb4da8a34472 Mon Sep 17 00:00:00 2001 From: eaolson Date: Sun, 17 Jun 2018 14:53:47 -0500 Subject: [PATCH 4/4] Fix issue 28 Raise error if cannot be converted to XML. --- ora/flex_ws_api.pkb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ora/flex_ws_api.pkb b/ora/flex_ws_api.pkb index eea66d9..a2012a3 100755 --- a/ora/flex_ws_api.pkb +++ b/ora/flex_ws_api.pkb @@ -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(