Skip to content

andrewbergsma/msp-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSP Export

Pure Python parser for Microsoft Project files (MPP/XML) with JSON export.

No Java required - directly parses the binary MPP format using olefile.

Installation

pip install olefile

Quick Start

# Parse MPP file to JSON
python src/msp_export.py project.mpp output.json

# Parse with pretty printing
python src/msp_export.py project.mpp output.json --pretty

# Parse MS Project XML format
python src/msp_export.py project.xml output.json

Features

  • Binary MPP Parsing: Reads MPP14+ files (MS Project 2010 and later)
  • XML Support: Full MS Project XML format support
  • JSON Export: Structured output with tasks, resources, assignments, and more

Extracted Data

Entity Fields
Tasks Name, ID, dates, duration, work, hierarchy, priority, constraints
Resources Name, type (Work/Material/Cost), rates
Assignments Task-resource links, work hours, allocation units
Predecessors Link types (FS, SS, FF, SF), lag
Calendars Working days, exceptions (holidays)
Agile Board columns, sprints

Library Usage

from src.mpp_reader import MPPReader

reader = MPPReader("project.mpp")
project = reader.read()

print(f"Project: {project.title}")
print(f"Tasks: {len(project.tasks)}")
print(f"Resources: {len(project.resources)}")

# Get resource totals
totals = project.get_resource_totals()
for name, hours in sorted(totals.items(), key=lambda x: -x[1]):
    print(f"  {name}: {hours:.1f}h")

Output Format

{
  "project": {
    "title": "Downtown Bank",
    "start_date": "2025-01-06T00:00:00",
    "finish_date": "2025-03-15T00:00:00"
  },
  "summary": {
    "task_count": 50,
    "resource_count": 10,
    "total_hours": 1500.0
  },
  "tasks": [...],
  "resources": [...],
  "assignments": [...],
  "predecessors": [...],
  "resource_totals": {"Civil Foreman": 500.0, ...}
}

Supported File Formats

Format Extension Support
MPP Binary .mpp, .mpt MPP14+ (Project 2010+)
MS Project XML .xml Full support

Limitations

  • MPP files older than Project 2010 may not parse correctly
  • Time-phased data (daily work breakdown) not extracted from binary format
  • No write support (read-only)

Documentation

License

MIT

About

Pure Python parser for Microsoft Project files (MPP/XML) with JSON export

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages