Smatesphonepascher Posted January 25, 2019 Share Posted January 25, 2019 Bonjour , j ai un module d'export de vente ,celui ci fonctionne bien mais une fois le fichier export sous excel celui ci ne prend pas en compte les accents français . pouvez vous m'aidez ? ps:je vous joint le module au cas ou vous voulez jetez un coup d’œil . Merci et bon weekend a tous exportventes.zip Link to comment Share on other sites More sharing options...
Eolia Posted January 25, 2019 Share Posted January 25, 2019 pour l'exporter sous excel il faut lui rajouter un BOM et forcer l'encodage en utf8 Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 Savez vous comment je doit faire? (car moi j ai aucune idees) lol. Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 j ai forcer l'encodage il me seble , mais pour le BOM JE CROIS PAS Link to comment Share on other sites More sharing options...
Eolia Posted January 25, 2019 Share Posted January 25, 2019 Quelque chose comme ça: header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); header('Content-Disposition: attachment; filename=orders_export.csv'); echo "\xEF\xBB\xBF"; // UTF-8 BOM Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 du coup si je rajoute ca ca devrait etre bon ? dans quell fichier faut til le rajouter ? Link to comment Share on other sites More sharing options...
Eolia Posted January 25, 2019 Share Posted January 25, 2019 dans le fichier download_file.php, à adapter. Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 (edited) adapter? dsl je suis novice c pour ça que je pose autant de questions Edited January 25, 2019 by Smatesphonepascher (see edit history) Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 j ai essayer de mettre le code en place mais çà change tjr pas ,savez vous comment je peut régler mon problème ? Merci Link to comment Share on other sites More sharing options...
Eolia Posted January 25, 2019 Share Posted January 25, 2019 <?php $file=$_GET['file']; //telechargement if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=export.csv'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Content-Length: ' . filesize($file)); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo "\xEF\xBB\xBF"; readfile($file); exit(); } else print "Can't find file"; Cadeau^^ Link to comment Share on other sites More sharing options...
Smatesphonepascher Posted January 25, 2019 Author Share Posted January 25, 2019 (edited) Merci bcp EOLIA , j ai fait les changements et la j ai ca qui s affiche : ZoUmRvHQ.csv.part ne pourra être enregistré car le fichier source ne peut être lu. Réessayez plus tard ou contactez l’administrateur du serveur. merci encor de votre aide Edited January 25, 2019 by Smatesphonepascher (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted January 25, 2019 Share Posted January 25, 2019 Euh... le fichier doit s'appeler : export.csv J'ai testé chez moi et cela fonctionne. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now