Working with Project Currencies
Working with project currencies in Aspose.Tasks for .NET is essential when dealing with cost-related data in Microsoft Project files. Microsoft Project allows you to define the currency symbol, code, and precision for all monetary values in a project. Aspose.Tasks exposes these settings through its rich API, making it easy to read and modify them programmatically without needing Microsoft Project installed on your system.
When loading a project file using the Project
class, you can access currency settings via properties such as Project.CurrencyCode
, Project.CurrencyDigits
, and Project.CurrencySymbol
. These values determine how costs are displayed and stored in the file. For example, if your organization works with multiple currencies across different regions, you can adjust the currency code to USD
, EUR
, or any other ISO-compliant value as required.
Aspose.Tasks also supports modifying currency formats at runtime. This means you can programmatically change the currency symbol from “$” to “€” or adjust the number of decimal digits for cost precision. Such flexibility is particularly useful when generating reports, integrating with ERP systems, or localizing project data for different markets.
In addition, the library ensures that any changes you make are preserved when saving the file back to formats such as MPP, XML, or MPX. This guarantees that the currency configuration will be correctly interpreted by Microsoft Project and other compatible software. Combined with other Aspose.Tasks features, currency management becomes a seamless part of your project automation workflow.
For detailed examples on managing currency settings, refer to the related sections on Managing Project Currency Codes, Managing Project Currency Digits, and Managing Currency Symbols.