antonscheffer / as_xlsx

as_xlsx: generate an Excel xlsx file from an Oracle database. Or read data from a xlsx. Works on Oracle 11.2, but also on 23c Free
MIT License
22 stars 6 forks source link

add_image procedure #6

Closed raffymartin closed 1 month ago

raffymartin commented 1 month ago

Hi Anton,

I recently downloaded the latest package, and I see a new add_image procdure which seems to be used to add insert images to the worksheet as objects not in a cell.

Anyway, the issue I found is with the first line using ora_hash.

select ora_hash( dbms_lob.substr( p_img ) ) into l_hash from dual;

Which causes a numeric or value error. I guess you used that rather DBMS_CRYPTO just in case this one might be accessible on some databases.

ORA-06512: at "NKW.AS_XLSX", line 2408 ORA-06512: at line 15

  1. 00000 - "PL/SQL: numeric or value error%s" Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2). Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.

Anyway, I want it to see if I could use this instead, but for now I guess I need to stick with the APEX_DATA_EXPORT and just wanted to report the issue I found.

Thank you for this and many wonders you have made possible in PL/SQL. Cheers.

Raffy Martin.

antonscheffer commented 1 month ago

Should be fixed

raffymartin commented 1 month ago

Yes, I can confirm the fix is working. Thank you.