SaveOptions.View property

Gets or sets a list of the view columns to render (GanttChartColumn). If not set then task ids, task names, start and finish are rendered only. If both View and ViewSettings properties are set, columns from View overrides columns from ViewSettings.

public ProjectView View { get; set; }


Shows how to add columns of view to be exported during export project.

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

var options = new Spreadsheet2003SaveOptions();
var ganttChartColumn = new GanttChartColumn("WBS", 100, delegate(Task task) { return task.Get(Tsk.WBS); });

var resourceViewColumn = new ResourceViewColumn("Cost center", 100, delegate(Resource resource) { return resource.Get(Rsc.CostCenter); });

var assignmentViewColumn = new AssignmentViewColumn("Notes", 200, delegate(ResourceAssignment assignment) { return assignment.Get(Asn.Notes); });

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

See Also