Question

I am working on my web project using Codeigniter. I want to generate an excel file by setting the data in the file, for now that's cool.

but I have a problem is that the site uses Arabic as a primary language, and I would set the title and description in the properties of excel file.

when I open the excel file and I open the properties, it does not display the title and description in Arabic, but like this:

هل تعتقد أن النظام السوري سيستجيب لشروط خاطÙÂي نساء وأطÙÂال من العلوين؟

I tried utf8_decode function but it does not work

thank you

Was it helpful?

Solution

the problem is that the excel file is saved version 5, then I should Register with the 2007 version (. xlsx) and the Arabic values ​​appear correctly in file properities:

$obj_writer = PHPExcel_IOFactory::createWriter($this->excel, 'Excel2007');
$obj_writer->save('php://output');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top