Read Timephased Data of a Resource

Timephased data in Microsoft Project represents the distribution of resource work and costs across a project timeline. This allows project managers to analyze workload allocation, resource utilization, and cost flow over specific time intervals. With Aspose.Tasks for .NET, developers can programmatically read resource timephased data directly from Microsoft Project files (MPP/XML). This makes it possible to create detailed reports, perform cost forecasting, and integrate resource analytics into custom project management systems.

Reading Timephased Resource Data

The Resource class provides the TimeScaleData method to extract timephased information.

This flexibility allows developers to analyze both workload and financial distribution across a project schedule.

Code Example

The following example demonstrates how to read the timephased data of a resource. This snippet loads a project file, retrieves resource-level timephased data, and outputs values such as work or cost per defined timescale. It can be applied in dashboards, reporting systems, or forecasting tools.

 1Project project = new Project("New Project.mpp");
 2
 3// Get the Resource by its ID
 4Resource resource = project.Resources.GetByUid(1);
 5
 6// Print Timephased data of ResourceWork
 7Console.WriteLine("Timephased data of ResourceWork");
 8foreach (TimephasedData td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate)))
 9{
10    Console.Write("Start: " + td.Start.ToShortDateString());
11    Console.Write(" Work: " + td.Value + Environment.NewLine);
12}
13
14// Print Timephased data of ResourceCost
15Console.WriteLine("Timephased data of ResourceCost");
16foreach (TimephasedData td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate), TimephasedDataType.ResourceCost))
17{
18    Console.Write("Start: " + td.Start.ToShortDateString());
19    Console.Write(" Cost: " + td.Value + Environment.NewLine);
20}

FAQ

Q: Do I need Microsoft Project installed to read timephased data?

Q: What is timephased data in project management?

Q: Which project file formats support timephased data extraction?

Q: Can I extract both work and cost data at the same time?

Q: Can I customize the time intervals (daily, weekly, monthly)?

Conclusion

Reading timephased data is crucial for understanding resource workload distribution and project cost dynamics over time. Using Aspose.Tasks for .NET, developers can efficiently extract and analyze both work and cost data from Microsoft Project files, enabling advanced reporting, forecasting, and decision-making — without requiring Microsoft Project itself.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.