diff --git a/Classes/PHPExcel/Reader/CSV.php b/Classes/PHPExcel/Reader/CSV.php index 194240f..21329da 100644 --- a/Classes/PHPExcel/Reader/CSV.php +++ b/Classes/PHPExcel/Reader/CSV.php @@ -168,10 +168,11 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R return; } - if ((strlen(trim($line)) == 5) && (strpos($line, 'sep=') !== 0)) { - return $this->skipBOM(); + if ((strlen(trim($line, "\r\n")) == 5) && (stripos($line, 'sep=') === 0)) { + $this->delimiter = substr($line, 4, 1); + return; } - $this->delimiter = substr($line, 4, 1); + return $this->skipBOM(); } /**