MS Project with Spreadsheet 2003 Options for Aspose.Tasks

Introduction

In this tutorial, we will delve into leveraging Aspose.Tasks for .NET to utilize the Spreadsheet 2003 Save MS Project Options. This powerful tool allows seamless manipulation and customization of MS Project files in the .NET environment. Let’s break down the process step by step.

Prerequisites

Before we embark on this tutorial, ensure you have the following prerequisites:

  1. Installation of Aspose.Tasks for .NET: Download and install the Aspose.Tasks for .NET library from the download link.
  2. Familiarity with C# Programming: Basic understanding of C# programming language is necessary to grasp the concepts discussed in this tutorial.

Import Namespaces

Begin by importing the necessary namespaces to your C# project:

    
    using Aspose.Tasks.Saving;
    using Aspose.Tasks.Visualization;

These namespaces provide access to the functionalities needed for saving MS Project files using Spreadsheet 2003 format and customizing the view options.

Step 1: Load the Project

Firstly, load the MS Project file using Aspose.Tasks:

var project = new Project(DataDir + "CreateProject2.mpp");

Replace "Your Document Directory" with the actual directory path where your MS Project file is located.

Step 2: Define Save Options

Define the Spreadsheet 2003 Save options by creating an instance of Spreadsheet2003SaveOptions:

var options = new Spreadsheet2003SaveOptions();

Step 3: Customize View Columns

Customize the view columns for Gantt chart, Resource view, and Assignment view:

var ganttChartColumn = new GanttChartColumn("WBS", 100, delegate(Task task) { return task.Get(Tsk.WBS); });
options.View.Columns.Add(ganttChartColumn);
var resourceViewColumn = new ResourceViewColumn("Cost center", 100, delegate(Resource resource) { return resource.Get(Rsc.CostCenter); });
options.ResourceView.Columns.Add(resourceViewColumn);
var assignmentViewColumn = new AssignmentViewColumn("Notes", 200, delegate(ResourceAssignment assignment) { return assignment.Get(Asn.NotesText); });
options.AssignmentView.Columns.Add(assignmentViewColumn);

These steps add custom columns to the respective views, enhancing the visualization and analysis capabilities of the MS Project file.

Step 4: Save the Project

Finally, save the project with the specified options:

project.Save(DataDir + "UsingSpreadsheet2003SaveOptions_out.xml", options);

This command saves the modified project with Spreadsheet 2003 format and the customized view columns.

Conclusion

Utilizing Aspose.Tasks for .NET, specifically the Spreadsheet 2003 Save MS Project Options, empowers developers to efficiently manage and customize MS Project files programmatically. By following the step-by-step guide outlined in this tutorial, you can seamlessly integrate these capabilities into your .NET applications, enhancing productivity and flexibility.

FAQ’s

Q: Can Aspose.Tasks for .NET be used in both web and desktop applications?

A: Yes, Aspose.Tasks for .NET can be seamlessly integrated into both web and desktop applications, providing consistent functionality across platforms.

Q: Is there a trial version available for Aspose.Tasks for .NET?

A: Yes, you can access a free trial of Aspose.Tasks for .NET from the website, allowing you to explore its features before making a purchase.

Q: Are there any limitations to customizing view columns using Aspose.Tasks for .NET?

A: Aspose.Tasks for .NET offers extensive customization options for view columns, with minimal limitations. However, complex customizations may require advanced knowledge of the library.

Q: Can I seek assistance if I encounter issues while using Aspose.Tasks for .NET?

A: Absolutely! You can find comprehensive support and resources on the Aspose.Tasks forum at https://forum.aspose.com/c/tasks/15, where experts and community members are available to help resolve any queries or challenges you may face.

Q: How can I obtain a temporary license for Aspose.Tasks for .NET?

A: You can acquire a temporary license for Aspose.Tasks for .NET from the purchase page, enabling you to evaluate the full capabilities of the library.