IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MkFramework Discussion :

Mkframework et PHPExcel


Sujet :

MkFramework

  1. #1
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juillet 2013
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations forums :
    Inscription : Juillet 2013
    Messages : 2
    Points : 3
    Points
    3
    Par défaut Mkframework et PHPExcel
    Bonjour,

    En essayant d'utiliser PHPExcel (http://phpexcel.codeplex.com/) avec mkframework j'ai l'erreur suivante :
    Erreur
    iconv(): Detected an illegal character in input string
    #0 [internal function]: exception_error_handler(8, 'iconv(): Detect...', 'C:\wamp\www\mkf...', 386, Array)
    #1 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Shared\String.php(386): iconv('UTF-8', 'UTF-8', '???????????????...')
    #2 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Cell\DefaultValueBinder.php(59): PHPExcel_Shared_String::SanitizeUTF8('???????????????...')
    #3 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Cell.php(218): PHPExcel_Cell_DefaultValueBinder->bindValue(Object(PHPExcel_Cell), '???????????????...')
    #4 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Worksheet.php(1042): PHPExcel_Cell->setValue('???????????????...')
    #5 C:\wamp\www\mkframework\data\genere\these\module\excel\main.php(60): PHPExcel_Worksheet->setCellValue('A5', '???????????????...')
    #6 C:\wamp\www\mkframework\data\genere\these\lib\framework\class_root.php(230): module_excel->_index()
    #7 C:\wamp\www\mkframework\data\genere\these\public\index.php(39): _root->run()
    #8 {main}

    Detail:
    #0 exception_error_handler( , 'iconv(): Detected an illegal character in input string' , 'C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Shared\String.php' , , Array ( [value] => éàèùâêîôûëïüÿäöüç ) )
    #1 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Shared\String.php (386)
    iconv( 'UTF-8' , 'UTF-8' , 'éàèùâêîôûëïüÿäöüç' )
    #2 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Cell\DefaultValueBinder.php (59)
    PHPExcel_Shared_String :: SanitizeUTF8( 'éàèùâêîôûëïüÿäöüç' )
    #3 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Cell.php (218)
    PHPExcel_Cell_DefaultValueBinder -> bindValue( , 'éàèùâêîôûëïüÿäöüç' )
    #4 C:\wamp\www\mkframework\data\genere\these\lib\phpexcel\PHPExcel\Worksheet.php (1042)
    PHPExcel_Cell -> setValue( 'éàèùâêîôûëïüÿäöüç' )
    #5 C:\wamp\www\mkframework\data\genere\these\module\excel\main.php (60)
    PHPExcel_Worksheet -> setCellValue( 'A5' , 'éàèùâêîôûëïüÿäöüç' )
    #6 C:\wamp\www\mkframework\data\genere\these\lib\framework\class_root.php (230)
    module_excel -> _index( )
    #7 C:\wamp\www\mkframework\data\genere\these\public\index.php (39)
    _root -> run( )
    #8 {main}


    J'utilise le premier exemple de phpexcel, et c'est lui qui cause le problème. Lorsque je le lance sans le framework, il se déroule correctement. Par ailleurs, il plante au moment d'insérer des caractères spéciaux, si je remplace les caractères spéciaux par des caractères normaux, ça se passe bien.

  2. #2
    Rédacteur
    Avatar de imikado
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2006
    Messages
    5 239
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Décembre 2006
    Messages : 5 239
    Points : 19 100
    Points
    19 100
    Billets dans le blog
    17
    Par défaut
    Essayez de modifier l encodage dans le fichier conf/site.ini.php pour utf-8
    Framework php sécurisé et simple à prendre en main avec générateur web http://mkframework.com/ (hebergé sur developpez.com)
    Mes cours/tutoriaux

  3. #3
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juillet 2013
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations forums :
    Inscription : Juillet 2013
    Messages : 2
    Points : 3
    Points
    3
    Par défaut
    Je l'ai testé sans résultat.

    Je viens de modifier le code de l'exemple :
    setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');
    -> setCellValue('A5', utf8_encode ('éàèùâêîôûëïüÿäöüç'));


    Cette fois ça fonctionne.

  4. #4
    Rédacteur
    Avatar de imikado
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2006
    Messages
    5 239
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Décembre 2006
    Messages : 5 239
    Points : 19 100
    Points
    19 100
    Billets dans le blog
    17
    Par défaut
    Ok, merci de l'information.
    Framework php sécurisé et simple à prendre en main avec générateur web http://mkframework.com/ (hebergé sur developpez.com)
    Mes cours/tutoriaux

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [PHPExcel] Génération de Fichiers Excel
    Par MaitrePylos dans le forum Bibliothèques et frameworks
    Réponses: 223
    Dernier message: 27/06/2016, 14h16
  2. [PHP 5.0] Utilisation de PHPExcel
    Par johnson95 dans le forum Langage
    Réponses: 2
    Dernier message: 19/03/2009, 11h13
  3. [Excel] Formattage des nombres avec PHPExcel !
    Par gentyjp dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 10/10/2007, 02h00

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo