Managing Currency Digits

Currency digits set the number of decimal points (digits after a decimal point) used for currency.

Managing Currency Digits

The CurrencyDigits property exposed by the Project class is used to set or get the number of digits after the decimal symbol for a project’s currency. This property supports the integer data type.

To view the currency digit for a project in Microsoft Project:

  1. Form the Tools menu, select Options.
  2. Select the View tab.

Currency digits in Microsoft Project

view currency digits in Microsoft Project 2010

Setting Currency Digits using Aspose.Tasks

The following example shows how to set currency digits with Aspose.Tasks.

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(CurrencyDigits.class);
4
5Project project = new Project();
6project.set(Prj.CURRENCY_DIGITS, 2);
7project.save(dataDir + "ProjectCurrDigits.mpp", SaveFileFormat.MPP);

Getting Currency Digits using Aspose.Tasks

The currency properties are accessed through the project’s CurrencyDigits 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(CurrencyDigits.class);
4
5Project project = new Project(dataDir + "project5.mpp");
6System.out.println(project.get(Prj.CURRENCY_DIGITS));
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.