Import from MS Project

AnGus King
  • AnGus King

    AnGus King - 2009-01-16


    I'm after a copy of the MS Project to FreeMind programs mentioned in Import and export to other applications ( . These are or - the links just link back to this page



    • Ira L. Greenstein


      Did you ever find the code to export MS Project files to FreeMind?

      Thank you,


      • Daniel Polansky

        Daniel Polansky - 2009-07-17

        The three files that were referred to in the wiki --,, -- are not there, and as far as I can ascertain never have been uploaded. I have deleted the misleading section from the wiki.


        • AnGus King

          AnGus King - 2009-08-11

          Ira and Dan

          I might have a look at this if you're interested (someday so don't hold your breath). I could go for something simple to start with so do you have any thoughts on what you'd like?


        • AnGus King

          AnGus King - 2009-08-12


          (Apologies for the tacky Python code, but I'm only a learner). The following Python routine is a first cut at creating a FreeMind map from an MS Project xml file (ie. need to save the MS Project file as xml rather than normal mpp). I don't know how to upload this into the FreeMind wiki but am happy to have it there - remembering this is "asis" with no waranty expressed or implied.

          Parameters are as described:

          -i <iput xml file>
          -o <output mm file> - defaults to same name as input file (but with .mm filetype)
          -a generate some Attributes. Theses are the same as the mm2mpp.xsl translater (ie. task duration, author and project start date)
          -c generate a flag (tick icon) for completed tasks

          This won't create the dependency arrows.

          Try it as a starter. Here's the code

          Kind regards


          #!/usr/bin/env python

          """Create a FreeMind (.mm) mind map from a/an MS Project XML file.

          usage: mpp2mm -i <mppfile> -o <mmfile> -a -c
          Options and arguments:
          -a         : generate (some) Attributes
          -c         : generate icons for completed tasks
          -i mppfile : input MS Project xml file
          -o mmfile  : output FreeMind map (name defaults to input filename)

          Copyright (C) AnGus King, 2009
          This code is licensed under the GPLv2 or later.


          __author__ = " (AnGus King)"
          __copyright__ = "Copyright (C) 2009 AnGus King"
          __license__ = "GPLv2 ("
          __version__ = "1.0"

          import getopt
          import sys
          import xml.etree.ElementTree as ET

          class Mpp2Mm:
              def __init__(self):
                  self.mmn = [] # create an empty node tree
                  self.lst_lvl = 0 # last level is 0
                  self.do_attr = False # by default don't create Attributes
                  self.do_flag = False # by default don't flag completion       

              def open(self, infile):
                  """ Open the .xml file and create a tree """
                  self.tree = ET.parse(infile)
                  return self.tree

              def write(self, outfile, attr, flag):
                  """ Create the .mm file :-) """
                  self.do_attr = attr
                  self.do_flag = flag
                  root = self.tree.getroot()
          #       create the mindmap as version 8.1 (can easily change to 9.0)
          #       should probably be 9.0 if you're generating attribute tags
         = ET.Element("map",version="0.8.1")
          #       process Task elements and fabricate hierarchy based upon OutlineLevel
                  for node in root:
                      if node.tag ==  "{}Name":
          #               print "Project:" , node.text
                          self.mmn[0] = ET.SubElement(, "node", text=node.text)
                      elif node.tag ==  "{}Author":
          #               print "Author:" , node.text
                          if self.do_attr:
                              self.mmn[0].append(ET.Element("attribute", \                         NAME="prj-Author", VALUE=node.text))
                      elif node.tag ==  "{}StartDate":
          #               print "StartDate:" , node.text
                          if self.do_attr:
                              self.mmn[0].append(ET.Element("attribute", \                          NAME="prj-StartDate", VALUE=node.text))   
          #               the guts of it is the Tasks
                          if node.tag ==  "{}Tasks":
                              for nod in node:
                                  if nod.tag ==  "{}Task":
                                      if nod.findtext("{}UID") <> "0":   
          #                               print "UID:", nod.findtext("{}UID")
          #                               print "Name:", nod.findtext("{}Name")
          #                               print "Start:", nod.findtext("{}Start")
          #                               print "Finish:", nod.findtext("{}Finish")
          #                               print "WBS:", nod.findtext("{}WBS")
                                          lvl = nod.findtext("{}OutlineLevel")
                                          txt = nod.findtext("{}Name")
          #                               print "Level/Task:", lvl + " " + txt
                                          lvli = int(lvl)
                                          if lvli > self.lst_lvl:
                                              self.lst_lvl = lvli
                                          self.mmn[lvli] = ET.SubElement(self.mmn[lvli-1], "node",text=txt)
                                          if self.do_attr:
                                              self.mmn[lvli].append(ET.Element("attribute", NAME="tsk-Duration", \                                         VALUE=nod.findtext("{}Duration")))
                                          if self.do_flag:   
                                              txt = nod.findtext("{}PercentComplete")
                                              if txt == "100":
                                                  self.mmn[lvli].append(ET.Element("icon", BUILTIN="button_ok"))
                  tree = ET.ElementTree(

          def usage():
              print __doc__

          def main():
                  opts , args = getopt.getopt(sys.argv[1:], "i:o:hac", \             ["help", "input=", "output="])
              except getopt.GetoptError, err:
                  # print help information and exit:
                  print str(err) # will print something like "option -x not recognized"
              input = None
              output = None
              attr = False
              complete = False
              for o, a in opts:
                  if o == "-a": # wants attributes printed
                      attr = True
                  elif o == "-c": # wants completion flags
                      complete = True   
                  elif o in ("-h", "--help"):
                  elif o in ("-i", "--input"):
                      input = a
                  elif o in ("-o", "--output"):
                      output = a
                      assert False, "unhandled option"
              if input == None:
                  print "Input file required"
              if not input.endswith('.xml'):
                  print "Input file must end with '.xml'"
              if output == None:
                  output = input[:-3] + "mm"
              if not output.endswith('.mm'):
                  print "Output file must end with '.mm'"
              mpp2mm = Mpp2Mm()
              tree =
              print output + " created."

          if __name__ == "__main__":

        • AnGus King

          AnGus King - 2009-08-14

          Dan and Ira

          I've posted these MS Project to FreeMind programs and a PyQT4 dialog into the Accessories page.

          I've also posted a FreeMind to MSProject XML file there as well. This was from the Help from many months ago.


          • Daniel Polansky

            Daniel Polansky - 2009-08-14

            Thank you AnGus. The best thing you can do I think with the code you have written is to post all the code and its documentation to the Conversions tracker. It is important that you attach an fitting license to the code or the documentation, such as GNU GPL V2+ or public domain: if you do, your code can be added to FreeMind distribution. Notice the "V2+" in GNU GPL V2+; the "+" is important -- it means that you license the code under GNU GPL version 2 *or later at your option*.

            The Conversions tracker:


            • AnGus King

              AnGus King - 2009-09-02


              I've added the suite of programs in the Tracker as 'MSProject2FreeMind and FreeMind2MSProject'. I've licensed as GPL2 those I feel I can (the two GUI programs are plagiarised from PyQt examples so not sure if there's enough originality in them).

              The MS Project to FreeMind tools (written in Python) will enable FreeMind maps to be created from MS Project normal (.mpp) and XML (.xml) files. It will create arrows for Predecessor links and flag completed tasks with flags (ticks). The maps created can then be exported to XML (via the XSLT tool) and reloaded into MS Project.

              In theory these tools should enable one to move both ways between MS Project and FreeMind.

              I might add support for CSV files. It would be nice to add Resourcing but I'll probably only look a that if I have a requirement.

              Happy for any feedback (I need to do more testing)

              Kind Regards


    • AnGus King

      AnGus King - 2009-08-13


      I've loaded this version (as and a new version in the wiki

      The new version ( will also handle .mpp files (win32com.client).

      Kind regards



    MOHAMED MESHREF - 2013-12-03

    I have tried to import an mpp file to freemind using file, but I got the here below error. Is there anyone that may help me?

    PS C:\mystaff> python27 'c:\mystaff\' -i "c:\mystaff\07-EA123_.mpp" -c -a
    Traceback (most recent call last):
    File "c:\mystaff\", line 37, in <module>
    from mppxml2mm import Mppxml2Mm
    ImportError: No module named mppxml2mm
    PS C:\mystaff>


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks