APEX Export to CSV exports nulls as a single space
We recently upgraded our Oracle APEX from version 4.2.6.00.03 to version 20.1.0.00.13. We are having an issue with one of our older apps on the new version. This app has an output page that exports an SQL query to a CSV file. The APEX attribute settings are as follows:
Template Type Predefined
Template CSV
Show Null Values as we have left this empty
CSV Export Enabled turned on
CSV Separator ,
CSV Enclosed By "
Link Text Save as CSV
Some of the data in some columns returned by the SQL is null which is normal. The issue is to do with how nulls are outputted to the CSV file. In version 4.2.6.00.03 these were written to the CSV file as "". In version 20.1.0.00.13 nulls are written to the CSV file as " ". For some reason a space is written for nulls. This causes an issue for the application that imports the file as space is not a value input.