Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mortenbra/alexandria-plsql-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenbra committed Oct 3, 2018
2 parents 1b4c1cb + 8a46dc2 commit c121c58
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
17 changes: 11 additions & 6 deletions ora/flex_ws_api.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
9 changes: 5 additions & 4 deletions ora/xlsx_builder_pkg.pkb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>';
Expand Down Expand Up @@ -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;
/
Expand Down
2 changes: 1 addition & 1 deletion ora/xlsx_builder_pkg.pks
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
create or replace package xlsx_builder_pkg
as
authid current_user as
/**********************************************
**
** Author: Anton Scheffer
Expand Down

0 comments on commit c121c58

Please sign in to comment.