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

Macros et VBA Excel Discussion :

Importer des fichiers ' .mm ' vers Excel en VBA


Sujet :

Macros et VBA Excel

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Étudiant
    Inscrit en
    Janvier 2018
    Messages
    51
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 32
    Localisation : France, Seine et Marne (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2018
    Messages : 51
    Par défaut Importer des fichiers ' .mm ' vers Excel en VBA
    Bonjour à tous,

    j'aimerai importer des fichiers d'extension '.mm' sont des carte mentale crées par le logiciel freemind ou freeplane et je veux faire un code VBA pour faire l'import de ces fichiers.
    j'ai besoins de vos conseils et vos propositions pour être sur la bonne voie s'il y'a des exemples qui me permet d'inspirer la résultat n'hésitez pas et merci pour vos aides.

    et voilà un exemple
    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    <map version="0.9.0">
    <!-- To view this file, download free mind mapping software FreeMind from <a href="http://freemind.sourceforge.net" target="_blank">http://freemind.sourceforge.net</a> -->
    <node CREATED="1519223795702" ID="ID_1835845759" MODIFIED="1519223801750" TEXT="carte">
    <node CREATED="1519223805024" ID="ID_1390948847" MODIFIED="1519223950740" POSITION="right" TEXT="exemple1">
    <richcontent TYPE="NOTE"><html>
      <head>   
     
      </head>
      <body>
        <table border="0" style="width: 80%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0">
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Nom
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Prénom
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Age
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                GERARD
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Alexis
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                28
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                LEMAIRE
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Francois
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                35
              </p>
            </td>
          </tr>
        </table>
      </body>
    </html>
    </richcontent>
    <node CREATED="1519291923283" ID="ID_1691256692" MODIFIED="1519292022892" TEXT="essaie"/>
    </node>
    <node CREATED="1519223812737" ID="ID_1515654871" MODIFIED="1519224049968" POSITION="right" TEXT="exemple2">
    <richcontent TYPE="NOTE"><html>
      <head>
     
      </head>
      <body>
        <table border="0" style="width: 80%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0">
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Département
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Unité
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Fonction
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Ingénierie
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Qualité
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Ingénieur
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Ingénierie
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Sécurité
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Ingénieur
              </p>
            </td>
          </tr>
        </table>
      </body>
    </html>
    </richcontent>
    </node>
    <node CREATED="1519223819275" ID="ID_576753259" MODIFIED="1519224139826" POSITION="right" TEXT="exemple3">
    <richcontent TYPE="NOTE"><html>
      <head>
     
      </head>
      <body>
        <table border="0" style="width: 80%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0">
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Pays
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Région
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Ville
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                France
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Iles-de-France
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Paris
              </p>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                France
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Iles-de-France
              </p>
            </td>
            <td valign="top" style="width: 33%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1; border-right-width: 1; border-bottom-width: 1; border-left-width: 1">
              <p style="margin-top: 1; margin-right: 1; margin-bottom: 1; margin-left: 1">
                Versaille
              </p>
            </td>
          </tr>
        </table>
      </body>
    </html>
    </richcontent>
    </node>
    </node>
    </map>
    Images attachées Images attachées  

  2. #2
    Expert éminent Avatar de Menhir
    Homme Profil pro
    Ingénieur
    Inscrit en
    Juin 2007
    Messages
    16 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Finistère (Bretagne)

    Informations professionnelles :
    Activité : Ingénieur
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2007
    Messages : 16 037
    Par défaut
    Ce que tu veux imprimer, ce sont les données de base ou la carte heuristique ?
    Dans le second cas, le plus simple est de faire un export en JPG ou PNG pour l'importer dans Excel.

    Ce format mm n'est pas reconnu tel quel par Excel.
    Si c'est du binaire, il ne sera pas possible de l'importer sans passer par un intermédiaire.
    Si c'est du texte, il faudrait en dire plus sur la structure.

  3. #3
    Expert éminent
    Avatar de Marc-L
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Avril 2013
    Messages
    9 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2013
    Messages : 9 468
    Par défaut
    Bonjour,

    Dali29, tu repostes exactement la même demande, certes ici le forum étant le plus approprié …

    T'ayant demandé d'effectuer une recherche, un test et le contexte de ce projet
    (contraintes / périmètre d'un devoir estudiantin ou d'un stage pro encadré par un tuteur, …)
    la version et la plateforme utilisée (encore une fois non renseignées dans la préfixe de la discussion !)
    et attendant toujours des réponses, je n'envisagerais rien de plus sans
    (voir les règles de ce forum sinon consulter un modérateur pour te les rappeler).

    Il y a déjà trois voies possibles, corriger la source (faut-il encore comprendre l'origine du problème),
    extraire les données via les simples fonctions texte du VBA (voir le tutoriel de ce forum)
    ou mieux utiliser un objet Windows corrigeant automatiquement la source réclamant à peine 10 lignes de code …

    ___________________________________________________________________________________________________________
    Je suis Paris, Egypte, Nigeria, New-York, Mogadicio, Barcelone, London, Manchester, Stockholm, Istanbul, Berlin, Nice, Bruxelles, Charlie, …

  4. #4
    Expert éminent Avatar de Menhir
    Homme Profil pro
    Ingénieur
    Inscrit en
    Juin 2007
    Messages
    16 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Finistère (Bretagne)

    Informations professionnelles :
    Activité : Ingénieur
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2007
    Messages : 16 037
    Par défaut
    Le Wiki officiel propose ça (10 min de recherche) :
    http://freemind.sourceforge.net/wiki...icrosoft_Excel
    To export to Microsoft Excel:

    Use the menu item File > Export > Using XSLT...
    Open the XSL file "mm2xls_utf8.xsl" (in /FreeMind/accessories)
    Name the export file something.xls
    Open the generated file by double-clicking it

  5. #5
    Expert éminent
    Avatar de Marc-L
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Avril 2013
    Messages
    9 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2013
    Messages : 9 468
    Par défaut

    Dali29 avais déjà évoqué cette voie du XLST dans sa discussion originelle
    mais je la lui avais déconseillée vu de mon côté le résultat obtenu en très peu de lignes de code
    mais beaucoup de points étant restés sans explication …

    Maintenant il peut effectivement incliner vers elle en profitant de ta recherche.

    ___________________________________________________________________________________________________________
    Heureux l'étudiant qui, comme la rivière, suit son cours sans quitter son lit !

  6. #6
    Membre averti
    Homme Profil pro
    Étudiant
    Inscrit en
    Janvier 2018
    Messages
    51
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 32
    Localisation : France, Seine et Marne (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2018
    Messages : 51
    Par défaut
    Merci pour vos réponses,

    effectivement j'ai fait des recherche sur l'extension .mm et je n'ai trouvé aucune relation entre l'excel et fichier .mm.
    le problème proposé y'en a des tableaux qui sont stockés dans les notes des noeuds alors ça sera difficile de l'afficher en excel même avec l'utilisation de XSLT alors le code de fichier .mm rassemble à HTML sauf qu'il y'a des petites modification au niveau des caractères (exemple: &#233; donne 'é' ) je cherche un code vba qui peut faire l'import de html et je vais le modifier selon mes besoins parce que je pense que la conversion vers excel ça sera compliqué

  7. #7
    Expert éminent
    Avatar de Marc-L
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Avril 2013
    Messages
    9 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2013
    Messages : 9 468
    Par défaut
    Non ce n'est pas si compliqué car déjà, comme indiqué dans ta précédente discussion
    et t'ayant demandé d'effectuer une simple p'tite recherche sur le codage HTML,
    juste en ouvrant le fichier mm dans le Bloc-Notes vu que ce n'est juste que du texte
    puis après avoir effectué la toute p'tite correction il suffit d'un simple Copier puis un Coller dans Excel
    car, faut-il encore te le rappeler, Excel sait depuis longtemps déjà interpréter du bon HTML !

    Autre point, le fichier contenant différentes données, ta capture d'écran n'en présente qu'une partie.
    Sans une explication digne de ce nom, sans voir l'aperçu du résultat escompté créé déjà
    manuellement dans une feuille de calculs d'Excel (juste les données brutes sans fioriture),
    j'ai des doutes sur l'envie d'aider suscitée chez un éventuel intervenant …

    ___________________________________________________________________________________________________________
    L'effort fait les forts …

Discussions similaires

  1. Importer des fichiers ' .mm ' vers Excel avec VBA
    Par Dali29 dans le forum Microsoft Office
    Réponses: 11
    Dernier message: 16/03/2018, 11h59
  2. Importer des fichiers access vers sas automatiquement
    Par benvanbelgie dans le forum SAS Base
    Réponses: 12
    Dernier message: 31/10/2013, 15h55
  3. Réponses: 0
    Dernier message: 07/06/2010, 16h01
  4. [MySQL] importer des fichiers word et excel vers base de donnée mysql
    Par malombe dans le forum PHP & Base de données
    Réponses: 3
    Dernier message: 23/07/2009, 19h20
  5. Importation de fichier Access vers EXCEL en VB
    Par yoruichi93 dans le forum IHM
    Réponses: 1
    Dernier message: 12/06/2006, 19h53

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