Managing Currency Codes
Contents
[
Hide
Show
]Managing Currency Codes
The CurrencyCode property exposed by the Project class is used to set or get the three-letter currency code for a project. This property supports the string data type.
To see a project’s currency code in Microsoft Project:
- On the Tools menu, select Options.
- Select the View tab
Currency codes in Microsoft Project
Setting Currency using Aspose.Tasks
The following example shows how to set these properties.
1Project prj = new Project();
2prj.set(Prj.CURRENCY_CODE, "USD");
Getting Currency Code using Aspose.Tasks
These properties can be accessed using the project’s CurrencyCode property.
1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(CurrencyCodes.class);
4
5Project prj = new Project(dataDir + "project5.mpp");
6System.out.println(prj.get(Prj.CURRENCY_CODE));