Reading .mpp file from Python 2.7
ms-project, python
Solution
- You need to install pywin3 (Python for Windows extensions).
- You can operate on .mpp files.
Example:
import win32com.client
doc = 'C:\\Project1.mpp'
try:
mpp = win32com.client.Dispatch("MSProject.Application")
mpp.Visible = 1
try:
mpp.FileOpen(doc)
proj = mpp.ActiveProject
print proj.BuiltinDocumentProperties(11), ",", proj.BuiltinDocumentProperties(12)
except Exception, e:
print "Error", e
mpp.FileSave()
mpp.Quit()
except Exception, e:
print "Error opening file",e
Problem
I need to read Microsoft Project Plan (.mpp file) from Python application running on Python 2.7. Not getting ANY resources or pointers on the web for the same. Any ideas?