Answer the question
In order to leave comments, you need to log in
How to fix encoding in PHPExcel?
Hello, tell me please. I have a string with the name of the Excel file name, I clear it of quotes and replace the spaces with "_", display it on the screen, everything is displayed as it should be like this: "OOO_Meruriy_101217.xls", but after generating the file name in a broken encoding "ООО_Мерурий_121017.xls", I use PHPExcel library, please tell me how can I fix it? Thank you in advance.
$objWriter = new PHPExcel_Writer_Excel5($xls);
$fileTemp = $renderable['_Own']['#value']."_".date("dmy").".xls";
$fileTemp2 = preg_replace('/\s+/u', '_', $fileTemp);
$filName = preg_replace('/\"/u', '', $fileTemp2);
echo $filName;
$objWriter->save('sites/default/Excelfille/'."$filName");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question