Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: PHPExcel convert XLS to CSV with special characters

$
0
0
Hello,

I'm having a small issue while converting an XLS file containing special characters to CSV file using PHPExcel classes.

As exemple the name "Kévin" gives "Kévin" in the CSV generated file.

Here is my current PHP code using PHPExcel :
$excel_readers = array(
        'Excel5' , 
        'Excel2003XML' , 
        'Excel2007'
        );

        require_once('classes/PHPExcel.php');

        $reader = PHPExcel_IOFactory::createReader('Excel5');
        $reader->setReadDataOnly(true);

        $path = $_FILES['file']['tmp_name'];
        $excel = $reader->load($path);

        $writer = PHPExcel_IOFactory::createWriter($excel, 'CSV');
        $writer->save('temp/absences.csv');

        echo 'File saved to csv format';
Any help would me much appreciate.

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>