Percentage Complete Calculations

Microsoft Project shows the percentage of a task that’s been completed. The percentage can be added manually, by a project manager, or automatically calculated by the application. Aspose.Tasks for .NET supports several percentage calculations related to tasks.

Percentages

The Tsk class exposes a number of properties used to calculate percentages:

To see the physical percent complete in Microsoft Project:

  1. On the Task Entry form, from the Insert menu, select Column.
  2. Add the column.

To see the completed percentage in Microsoft Project one can double-click the desired column in the Task Entry form.

Getting Percentages in Aspose.Tasks

The following example shows how to get the percentages of work relating to tasks using Aspose.Tasks.

1Project project = new Project("TaskPercentageCompletion.mpp");
2
3// Access tasks and display percentage completion
4foreach (Task task in project.RootTask.Children)
5{
6    Console.WriteLine(task.Get(Tsk.PercentComplete));
7    Console.WriteLine(task.Get(Tsk.PercentWorkComplete).ToString());
8    Console.WriteLine(task.Get(Tsk.PhysicalPercentComplete).ToString());
9}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.