liuggio / ExcelBundle

Excel integration in Symfony2 thanks to https://github.com/PHPOffice/PHPExcel library
www.welcometothebundle.com
MIT License
369 stars 142 forks source link

How to read cyrillic characters? #121

Open RainOGD opened 7 years ago

RainOGD commented 7 years ago

class ExcelDataController extends Controller { public function readAndSaveAction() { $filename = $this->container->getParameter('xls_fixture_absolute_path'); $phpExcelObject = $this->get('phpexcel')->createPHPExcelObject($filename); // $writer = $this->get('phpexcel')->createWriter($phpExcelObject, 'Excel5');

    for ($i = 1; $i <= 10; $i++){
        $value = $phpExcelObject->getActiveSheet()->getCell('C' . $i)->getValue();
        var_dump($value);
    }

    die;

// $writer->save($filename); } }

I get bad characters when I'm trying to read xlsx file with russian characters. How to resolve this?