Aspose.Tasks.Examples.CSharp.ConvertingProjectData.UsingSpreadsheet2003SaveOptions.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {

            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);

            // Read the input Project file
            Project project = new Project(dataDir + "CreateProject2.mpp");

            // ExStart:UsingSpreadsheet2003SaveOptions
            Spreadsheet2003SaveOptions options = new Spreadsheet2003SaveOptions();
            GanttChartColumn col = new GanttChartColumn("WBS", 100, delegate(Task task) { return task.Get(Tsk.WBS); });
            options.View.Columns.Add(col);

            ResourceViewColumn rscCol = new ResourceViewColumn("Cost center", 100, delegate(Resource resource)
            { return resource.Get(Rsc.CostCenter); });
            options.ResourceView.Columns.Add(rscCol);

            AssignmentViewColumn assnCol = new AssignmentViewColumn("Notes", 200, delegate(ResourceAssignment assignment)
            { return assignment.Get(Asn.Notes); });
            options.AssignmentView.Columns.Add(assnCol);

            project.Save(dataDir + "UsingSpreadsheet2003SaveOptions_out.xml", options);
            // ExEnd:UsingSpreadsheet2003SaveOptions
        }
    }
UsingSpreadsheet2003SaveOptions