diff --git a/src/Jobs/GenerateCSVJob.php b/src/Jobs/GenerateCSVJob.php index 9cbb9dd..008ff33 100644 --- a/src/Jobs/GenerateCSVJob.php +++ b/src/Jobs/GenerateCSVJob.php @@ -224,10 +224,10 @@ protected function getOutputPath() protected function getCSVWriter() { if (!$this->writer) { - $csvWriter = Writer::createFromPath($this->getOutputPath(), 'w'); + $csvWriter = Writer::createFromPath($this->getOutputPath(), 'a'); $csvWriter->setDelimiter($this->Seperator); - $csvWriter->setNewline("\r\n"); //use windows line endings for compatibility with some csv libraries + $csvWriter->setNewline(""); $csvWriter->setOutputBOM(Writer::BOM_UTF8); if (!Config::inst()->get(GridFieldExportButton::class, 'xls_export_disabled')) {