Changing Task Progress

Why Change Task Progress?

Tracking and updating task progress is essential for project management. In Microsoft Project, progress is usually recorded as % Complete.

With Aspose.Tasks for .NET, developers can programmatically set a task’s progress, which is especially useful for automated reporting, synchronization with external systems, or bulk updates.

API for Task Progress

The Task class provides the method:

This directly corresponds to the % Complete field in Microsoft Project.

Example: Changing Task Progress in C#

Here’s how to update the progress of a task programmatically:

1Project project = new Project();
2Console.WriteLine("Project Calculation mode is Automatic: {0}", project.CalculationMode.Equals(CalculationMode.Automatic));
3
4Task task = project.RootTask.Children.Add("Task");
5task.Set(Tsk.Duration, project.GetDuration(2));
6task.Set(Tsk.PercentComplete, 50);

Tip: Updating task progress can also affect actual start/finish dates and remaining duration, depending on the project settings.

Key Benefits

FAQ

Q: Can I set progress greater than 100%?

Q: Does changing progress automatically update ActualWork or RemainingWork?

Q: Can I partially update multiple tasks at once?

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.