我正在使用MPXJ 7.8.1读取MS Project File(.mpp)。我将项目日历更改为“ 24小时”,如下所示:
ProjectProperties.getDefaultCalendarName返回正确的日历名称“ 24小时”。
但是ProjectFile.getDefaultCalendar返回了错误的日历“ 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
有没有办法获取正确的日历?
答案 0 :(得分:0)
我已经使用MPXJ 7.9.1在本地进行了尝试,该功能似乎按预期工作。如果仍然有问题,可以在GitHub上打开一个问题并附加一个演示问题的MPP文件-谢谢!
答案 1 :(得分:0)
我最近对其进行了更多挖掘,发现这是由我使用的“ Project Plan 365”软件引起的。在它生成的文件中,默认日历的值不正确,这使得使用MPXJ读取时无法识别。使用MS Project生成的文件没有此问题。