0

I am using MPXJ 7.8.1 to read MS Project File(.mpp). I changed the Project Calendar to "24 Hours" as following: enter image description here

ProjectProperties.getDefaultCalendarName returns the correct calendar name "24 Hours".

But the ProjectFile.getDefaultCalendar returns the incorrect calendar "Standard".

    ...
    UniversalProjectReader reader = new UniversalProjectReader()
    ProjectFile projectFile = reader.read(stream)
    ProjectProperties projectProperties = projectFile.getProjectProperties()
    "projectProperties.getDefaultCalendarName = " + projectProperties.getDefaultCalendarName() + ", projectFile.getDefaultCalendar = " + projectFile.getDefaultCalendar().getName()

Output: projectProperties.getDefaultCalendarName = 24 Hours, projectFile.getDefaultCalendar = Standard

Is there a way to get the correct calendar?

Kenneth
  • 181
  • 3
  • 12

2 Answers2

1

I've tried this locally with MPXJ 7.9.1 and the functionality seems to work as expected. If you are still having issues, can you open an issue on GitHub and attach an MPP file which demonstrates the problem - thanks!

Jon Iles
  • 2,519
  • 1
  • 20
  • 30
0

I recently dug it more and found out that this is caused by the software "Project Plan 365" I use. In the file generated by it, the value of the default calendar is incorrect, which makes it unrecognizable when read with MPXJ. Files generated using MS Project do not have this problem.

Kenneth
  • 181
  • 3
  • 12