Introduction to Formulas
Aspose.Tasks for Java API supports reading/writing formulas to MPP project files. The Formula property of the ExtendedAttributeDefinition provides the interface for reading the formula value. This section describes how to read formulas from local as well as Enterprise Extended Attributes from the MPP file.
When assigning an invalid formula string to the instance of ExtendedAttributeDefinition class, FormatException is thrown.
Formula Grammar Microsoft Project uses the following grammar for formula.
1Formula -> Formula Binary_Op Primary | Primary
2Primary -> (Formula) | Unary_Op Primary | Function | [ValidFieldName] | ValidDoubleValue | "StringLiteral"
3Function -> ValidFunctionName(Args)
4Args -> Args Delimiter Formula | Formula | |
5Delimiter -> , | ; Note that Delimiter is culture-specific in xml format ( , or ; ) and persistent in mpp ( , )
6Binary_Op -> + | - | * | / | & | MOD | ^ | = | <> | < | >| AND | OR
7Unary_Op -> NOT | + | -