Empty cells in CSV files

Topics: Developer Forum
Jan 11, 2011 at 11:46 AM

Another issue I found, this time in the CSV-Reader. If a CSV-file contains empty cells, like in:

"A3";"Descriptive text";;"C62";0.85

which should be allowed, than the empty cell is skipped by the CSV-Reader. The offending line is

if ($rowDatum != '' && $this->_readFilter->readCell($columnLetter, $currentRow))
If somebody really wants to completely skip empty cells, which I think is unlikely, he could implement his own filter to do so. The comparison with the empty string makes it impossible to read such files, however.

Jan 11, 2011 at 3:19 PM

Well, forget about that one. I did not take into account that CellIterator() skips empty cells, sorry.