Managing Project Currency Codes
Overview
In Microsoft Project, the currency code determines how monetary values are displayed in a project (e.g., USD for US dollars, EUR for euros).
It follows the
ISO 4217 standard — a three-letter code for each currency.
This is especially important when:
- Working with international projects that involve multiple currencies.
- Preparing localized reports for different regions.
- Integrating with financial or ERP systems that require specific currency formats.
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 check the currency code of a project in Microsoft Project:
- On the Tools menu, select Options.
- Go to the View tab.
- The currency code is shown in the Currency section.
Currency codes in Microsoft Project
Figure: Viewing and editing currency codes in Microsoft Project.
Working with Currency Codes in Aspose.Tasks
The
CurrencyCode
property of the
Project
class is used to get or set the project’s three-letter currency code.
Setting a Currency Code
The following example shows how to set these properties.
1// Create new project and set currency code
2Project project = new Project();
3project.Set(Prj.CurrencyCode, "USD");
Key points:
- Always use ISO 4217 codes (
USD
,EUR
,UAH
, etc.). - Changing the currency code affects display only — it does not convert existing values.
- If the provided code is not recognized, MS Project may revert to its default.
Getting Currency Code using Aspose.Tasks
These properties can be accessed using the project’s CurrencyCode property.
1Project project = new Project("New Project.mpp");
2Console.WriteLine(project.Get(Prj.CurrencyCode));
Best Practices
- ✅ Use ISO 4217 codes to ensure compatibility across systems.
- ✅ Update
CurrencySymbol
,CurrencyDigits
, andCurrencySymbolPosition
for complete localization. - ✅ Validate the currency code before saving, especially if it comes from user input.
- ❌ Avoid assuming that changing the currency code will automatically convert costs — it won’t.
Related API Members
CurrencySymbol
— The symbol used for currency display.CurrencyDigits
— Number of decimal digits for currency values.CurrencySymbolPosition
— Placement of the currency symbol relative to the number.
FAQ
Q: What happens if I set an invalid currency code?
A: MS Project may fall back to its default currency or ignore the change.
Q: Will changing the currency code update all project values?
A: No. It changes only how the currency is displayed, not the numerical values.
Summary
Managing currency codes in Aspose.Tasks for .NET is straightforward:
- View currency codes directly in Microsoft Project or programmatically via
CurrencyCode
. - Set new codes to match reporting or regional requirements.
- Follow best practices to avoid inconsistencies.
By leveraging this feature, you can ensure that your projects remain consistent and ready for international collaboration.