Answer the question
In order to leave comments, you need to log in
(PHPExcel) How do I put the euro sign in a cell?
Good afternoon! How to write to a cell Betrag €
so that it would be considered a string?
Now the output is 0 (zero)
Answer the question
In order to leave comments, you need to log in
What string encoding?
https://www.php.net/manual/ru/function.utf8-encode.php
I copied the text from your question, everything turned out fine
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue('A1', 'Hello')
->setCellValue('B2', 'world!')
->setCellValue('D2', 'Betrag €');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question