PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.2k forks source link

Save filename japanese #1398

Open hieurhodium opened 6 years ago

hieurhodium commented 6 years ago

I'm want save file with filename is Japanese (Ex: ベトナム実習生候補者名簿.xls) by PHPExcel.

I'm tried with code:

$fileName = iconv("utf-8", "CP932", "ベトナム実習生候補者名簿");
$newFile = $fileName.'xls';

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save($newFile);

and result: ƒxƒgƒiƒ€ŽÀK¶Œó•âŽÒ–¼•ë.xls

How to fix that, thanks all!