Tuesday, 15 June 2010

Pear Excel Writer ENCODING -



Pear Excel Writer ENCODING -

i'm developing automated excel-export pear excel writer: http://pear.php.net/package/spreadsheet_excel_writer/docs

i used $worksheet->setinputencoding("iso-8859-1") set encoding, because php scheme gives iso-8859-1 if utilize iconv();

but in excel file have display errors umlaut (in german).

***** php *****

require_once 'spreadsheet/excel/writer.php'; $workbook = new spreadsheet_excel_writer(); $workbook->send('data.xls'); $worksheet =& $workbook->addworksheet('data'); $worksheet->setinputencoding("iso-8859-1"); // !?!?! // $worksheet->write() , on $worksheet->write($row, 2, 'priotität', $format_bold); // problem word 'ä'

***** problem *****

it looks in excel sheet:

http://www.pic-upload.de/view-25183541/unbenannt.png.html

your php code written in utf-8, set input encoding iso-8859-1.

set input encoding utf-8 prepare issue.

excel encoding pear writer

No comments:

Post a Comment