I use:
header('Content-Type: application/csv; utf-8');
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$fileName.'.csv"');
but I tried to use what you offered me but I had the same problem Thank you very much