

The rest of the Office 2007 formats such as Word, Excel, Visio, … have remained the same as in 2007 (in the case of Visio even the same as 2003). This was the prevent any accidental file format issues with people still using Microsoft Project 2007. For a roll out of Office 2010 we needed to set the default format when saving to Microsoft Project 2007 and not Microsoft Project 2010. Task.getCachedValue(type)), column_types)Īs the Python version of MPXJ is a wrapper around the underlying Java version, you'll find a lot of useful details about the classes and methods available by consulting the Javadoc. # and retrieve the values using the field types. # Now we can print the column headings, then iterate through the tasks # First we'll build a list of column headings and a list of field typesĬolumn_types = Ĭolumn_names.append(str(field.getAlias()))Ĭolumn_types.append(field.getFieldType()) # Let's build a report showing the ID, Name and any custom fields for each task.

).getFieldTypeClass() = FieldTypeClass.TASK, project.getCustomFields()))įield.getFieldType().toString() + "\t" + field.getAlias()) Task_custom_fields = list(filter(lambda field: field.getFieldType( Let's filter that list down to just task custom # Ah! We have custom field definitions here for different entity types

Print(field.getFieldType().getFieldTypeClass().toString() + "\t" + # Just to get started, let's see what tasks we have Unfortunately I don't have a lot of examples in Python for MPXJ yet, but I'm working on it! In the meantime I've adapted your code to show how you can retrieve details of all the custom fields present in a project, then filter those down just to task fields, and then finally use the field type to dynamically retrieve the values for the custom fields, and also use the "alias" as a column heading: import jpypeįrom net.sf.mpxj.reader import UniversalProjectReader
