PHPExcel_RichText can not support chinese character in Excel5?

Topics: Developer Forum, Project Management Forum, User Forum
Dec 29, 2012 at 3:11 AM

can  PHPExcel_RichText  suppoert chinese character?

I create a Excel5 writer and create a XLS file ,but when i  create a PHPExcel_RichText

the xls file can not be opened.


This is my souce code:

 $objRichText = new PHPExcel_RichText();
  $objRichText->createText('你好 ');

  $objPayable = $objRichText->createTextRun('你 好 吗?');
  $objPayable->getFont()->setBold(true);
  $objPayable->getFont()->setItalic(true);
  $objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) );

  $objRichText->createText(', unless specified otherwise on the invoice.');

$this->objPHPExcel->getActiveSheet()->getCell('D16')->setValue($objRichText);

comment:

If  the character is English  that will work fine.

Coordinator
Dec 29, 2012 at 1:06 PM

Please test this with the latest github code, a fix was put in for UTF-8 in Rich Text runs for Excel5 as Work Item 18551 on December 11th

Jan 2, 2013 at 7:11 AM
MarkBaker wrote:

Please test this with the latest github code, a fix was put in for UTF-8 in Rich Text runs for Excel5 as Work Item 18551 on December 11th


Hi MarkBaker,

    Thanks for your reply, I am green hand ,will you please give me a link of the lastest github code.

Thanks very much.

Coordinator
Jan 2, 2013 at 9:56 AM

https://github.com/PHPOffice/PHPExcel