FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=9062&edit=1

ID: 9062
Comment by: savan
Reported By: savan_s at live dot com
Summary: Euro does not appear correctly in formula styles
Status: Closed
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Apache Webserver | Windows XL
Package Version: 0.9.1
PHP Version: 4.4.3
Assigned To: progi1984
New Comment:

Hi All,

I was having the same problem with euro sign during search i found this
thread and i followed all the steps given in it. But instead of euro
sign the blank sign is coming . before i have applied the patch some
junk charchter was there now no character so strange not sure. Can
anyone help me to get out of this.

Thanks


Previous Comments:
------------------------------------------------------------------------

[2010-08-24 08:48:24] bowlkhin

I'm sorry, I forgot to update the patch. Now it works correctly.

Thanks :)

------------------------------------------------------------------------

[2010-08-24 07:39:29] bowlkhin

hi Franck Lefevre,

I do apply your solution but there's no effect, it display unreadable
sign instead of Euro sign.

I set version = 8, input encoding = UTF-8, try with $workSheet->write(1,
1, 1000, $myNumFormat);

thanks for any help,

------------------------------------------------------------------------

[2010-03-31 11:26:18] progi1984

Thanks to fveille

Try with this code :
$biffVersion = 8;
//$biffVersion = null;
$inputEncoding = 'UTF-8';

//Spreadsheet_Excel_Writer instance
$workBook = new Spreadsheet_Excel_Writer();
//setting biff version
$workBook->setVersion($biffVersion);


//Worksheet instance
$workSheet =& $workBook->addWorksheet();

if ($biffVersion == 8){
//setting inputEncoding
$workSheet->setInputEncoding($inputEncoding);//useless if biff version
!= 6
$euroSign = "€"; //unicode
} else {
$euroSign = chr(128); //ASCII / ISO-8859 / what php/local do?
}


//adding user defined Excell formats
$myNumFormat =& $workBook->addFormat(array('NumFormat'=>"# ##0.00
".$euroSign));
//larger columns
$workSheet->setColumn(0,1,25);

//writting something
$workSheet->write(0, 0, "The Euro sign : ");
$workSheet->write(0,1,"\xE2\x82\xAC");
$workSheet->write(1, 0, "A formated number : ");
$workSheet->write(1, 1, 1000, $myNumFormat);
$workSheet->write(2, 0, "Some chineese characters : ");
$workSheet->write(2, 1, "\xe6\xb1\x89 \xe5\xad\x97");

$workBook->send('my_test.xls');
$workBook->close();

------------------------------------------------------------------------

[2010-03-31 11:26:06] progi1984

<div id="changeset">
<span class="removed">-Status: Verified</span>
<span class="added">+Status: Closed</span>
</div>This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

------------------------------------------------------------------------

[2010-02-16 14:37:01] fvielle

Added #patch
bug:9062;patch:corect_unicode_encoded_number_format;revision:1266331021;.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=9062

Search Discussions

  • Savan_s at Oct 8, 2011 at 7:23 am
    Edit report at http://pear.php.net/bugs/bug.php?id=9062&edit=1

    ID: 9062
    Comment by: savan_s@live.com
    Reported By: simon at elroble dot co dot uk
    Summary: Euro does not appear correctly in formula styles
    Status: Closed
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Apache Webserver | Windows XL
    Package Version: 0.9.1
    PHP Version: 4.4.3
    Assigned To: progi1984
    Roadmap Versions:
    New Comment:

    Can anyone please help me to get out of this ?

    As I tried all the way here given but still the euro sign is not
    coming....

    This are the steps I did:
    - Patched the file with the version provided
    - Utf-8 with the version 8 is passed
    - then the euro sign is applied.

    Is there any step am i missing can anyone please guide ?


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-10-05 16:00:57] savan

    Hi All,

    I was having the same problem with euro sign during search i found this
    thread and i followed all the steps given in it. But instead of euro
    sign the blank sign is coming . before i have applied the patch some
    junk charchter was there now no character so strange not sure. Can
    anyone help me to get out of this.

    Thanks

    ------------------------------------------------------------------------

    [2010-08-24 08:48:24] bowlkhin

    I'm sorry, I forgot to update the patch. Now it works correctly.

    Thanks :)

    ------------------------------------------------------------------------

    [2010-08-24 07:39:29] bowlkhin

    hi Franck Lefevre,

    I do apply your solution but there's no effect, it display unreadable
    sign instead of Euro sign.

    I set version = 8, input encoding = UTF-8, try with $workSheet->write(1,
    1, 1000, $myNumFormat);

    thanks for any help,

    ------------------------------------------------------------------------

    [2010-03-31 11:26:18] progi1984

    Thanks to fveille

    Try with this code :
    $biffVersion = 8;
    //$biffVersion = null;
    $inputEncoding = 'UTF-8';

    //Spreadsheet_Excel_Writer instance
    $workBook = new Spreadsheet_Excel_Writer();
    //setting biff version
    $workBook->setVersion($biffVersion);


    //Worksheet instance
    $workSheet =& $workBook->addWorksheet();

    if ($biffVersion == 8){
    //setting inputEncoding
    $workSheet->setInputEncoding($inputEncoding);//useless if biff version
    != 6
    $euroSign = "€"; //unicode
    } else {
    $euroSign = chr(128); //ASCII / ISO-8859 / what php/local do?
    }


    //adding user defined Excell formats
    $myNumFormat =& $workBook->addFormat(array('NumFormat'=>"# ##0.00
    ".$euroSign));
    //larger columns
    $workSheet->setColumn(0,1,25);

    //writting something
    $workSheet->write(0, 0, "The Euro sign : ");
    $workSheet->write(0,1,"\xE2\x82\xAC");
    $workSheet->write(1, 0, "A formated number : ");
    $workSheet->write(1, 1, 1000, $myNumFormat);
    $workSheet->write(2, 0, "Some chineese characters : ");
    $workSheet->write(2, 1, "\xe6\xb1\x89 \xe5\xad\x97");

    $workBook->send('my_test.xls');
    $workBook->close();

    ------------------------------------------------------------------------

    [2010-03-31 11:26:06] progi1984

    -Status: Verified
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=9062

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedOct 5, '11 at 2:04p
activeOct 8, '11 at 7:23a
posts2
users2
websitepear.php.net

2 users in discussion

Savan_s: 1 post Savan: 1 post

People

Translate

site design / logo © 2022 Grokbase