Closed eaolson closed 6 years ago
I think this is happening on line 1358 in xlsx_builder_pkg.pkb:
t_xxx := t_xxx || '<legacyDrawing r:id="rId' || ( workbook.sheets( s ).hyperlinks.count() + 1 ) || '"/>';
I don't quite understand why, but when t_xxx is large, concatenating a number raises this error. Adding TO_CHAR prevents this.
Oh, and this line only happens when workbook.sheets( s ).comments.count() > 0, but is adding the hyperlinks count. Is that intentional?
Ah, this is a known Oracle bug happening in 10.1 and above. See Doc ID 746261.1. Solution is to use dbms_lob.writeappend or to_char.
Thanks for reporting this, I'm marking it as a bug. Feel free to submit a pull request to fix it.
As can be seen in the package header, this package is based on Anton Scheffer's (@antonscheffer) "as_xlsx" package, so I can't comment on whether the mismatch between the hyperlinks/comments arrays is intentional. It does look weird, though. I've had a look at the latest version of Anton's package (https://technology.amis.nl/wp-content/uploads/2011/02/as_xlsx18.txt) and the discrepancy is still there.
The " discrepancy" is intentional.
In a XLSX workbook large enough that one of the XML files is over the 32767 byte limit, adding a comment will cause ORA-06502, PL/SQL: numeric or value error to be raised when finish() is called.
To replicate: