Codeigniter/PHPexcel在xls文件的属性中设置阿拉伯语标题 [英] Codeigniter / PHPexcel Set arabic title in properties of xls file
问题描述
我正在使用Codeigniter进行Web项目.我现在想通过设置文件中的数据来生成一个excel文件.
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.
但是我有一个问题是该网站使用阿拉伯语作为主要语言,因此我将在excel文件的属性中设置标题和描述.
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.
当我打开excel文件并打开属性时,它不会以阿拉伯语显示标题和描述,而是这样:
when I open the excel file and I open the properties, it does not display the title and description in Arabic, but like this:
ÙÇÙÂê〜Â〜ª™™Â〜¯Ã£™™™§§§§„Ù™™〜〜¸¸ 〜§Ã™ÂÃÃ〜§Ù„„ijوñيÃ〜³ÙŠÃÂÂÂÂÂÃÂÂÂÂÂÂÂÂÃÂÃÃÃÃà ÂروØ ÃØÂÃÙÂينسç§ÃÂÂ٘Ã〜 £ÃÂÂÙÂï§ÙÃÃÅÙÆÃÃï§Ù„„ÃùÙÂÃÃȈي™††ÃŸ
هل تعتقد أن النظام السوري سيستجيب لشروط خاطÙÂي نساء وأطÙÂال من العلوين؟
我尝试了utf8_decode函数,但是它不起作用
I tried utf8_decode function but it does not work
谢谢
推荐答案
问题是excel文件已保存版本5,那么我应该注册2007版本(.xlsx),并且阿拉伯文值正确显示在文件属性:
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');
这篇关于Codeigniter/PHPexcel在xls文件的属性中设置阿拉伯语标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!