CHCSVParser icon indicating copy to clipboard operation
CHCSVParser copied to clipboard

Fixed an exception when nil fields are sent to the exporter

Open Motti-Shneor opened this issue 9 years ago • 0 comments

The docs say it is alright to send empty strings and nils to the CSV Exporter as fields. However nil fields in the first line cause exception, because _firstLineKeys NSArray won't accept. I followed the example of the next lines (of writeField:) which replace nil with empty string - which is acceptable in the array.

Same in the CSVParser, although nil fields there can cause problems if there are more than one. I think the "use first line as keys" option isn't very robust.

Motti-Shneor avatar Jan 20 '16 15:01 Motti-Shneor