CLOB not Exported to Excel when record size exceed 32K
说明
When CLOB records are exported to Excel with a size of more than 32K the Excel field comes out blank, null, or truncated.
原因
The total number of characters that an Excel cell can contain is 32,767 characters. It is the main reason why the data appears blank, null, or truncated.
Clicking here you can review the Microsoft page with Excel specifications and limits.
解决办法
Limit the record to 32K or split the record into different chunks.
Workaround #1
Limit the record to 32K. In Oracle, you can limit the size of a CLOB (Character Large Object) column to 32K by using the VARCHAR2 data type instead of CLOB. The VARCHAR2 data type allows you to specify a maximum size, and you can set this size to 32K (32767 bytes).
Workaround #2
Split the record. Using functions like dbms_lob.substr to limit the size of the existing CLOB record.
其他信息
For more reference, we recommend reviewing Oracle documentation to find out more options to split the CLOB record.