XlsxOptions class

Allows to specify additional options when rendering project pages to XLSX.

public class XlsxOptions : SimpleSaveOptions


XlsxOptions()Initializes a new instance of the XlsxOptions class that can be used to save project in XLSX format.


AssignmentView { get; set; }Gets or sets a list of the assignments view columns to render (AssignmentViewColumn).
Encoding { get; set; }Gets or sets the encoding of the resulting XLSX file. The default value is UTF8.
ResourceView { get; set; }Gets or sets a list of the resource view columns to render (ResourceViewColumn).
SaveFormat { get; }Gets or sets the format in which the document will be saved if this save options object is used.
TasksComparer { get; set; }Gets or sets the comparer to sort tasks on Gantt chart and Task Sheet chart.
TasksFilter { get; set; }Gets or sets the condition which is used to filter tasks rendered on Gantt, Task Sheet and Task Usage charts.
View { get; set; }Gets or sets a list of the view columns (GanttChartColumn) to save to XLSX format. If not set then default columns are saved.


Shows how to save a project into XLSX file by using <see cref=“P:Aspose.Tasks.Saving.XlsxOptions”>Days</see> options.

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

var options = new XlsxOptions();

// Add desired Gantt Chart columns
var col = new GanttChartColumn("WBS", 100, delegate(Task task) { return task.Get(Tsk.WBS); });

// Add desired resource view columns
var rscCol = new ResourceViewColumn("Cost center", 100, delegate(Resource resource) { return resource.Get(Rsc.CostCenter); });

// Add desired assignment view columns
var assnCol = new AssignmentViewColumn("Notes", 200, delegate(ResourceAssignment assignment) { return assignment.Get(Asn.NotesText); });

// set encoding
options.Encoding = Encoding.Unicode;

project.Save(OutDir + "UsingXlsxOptions_out.xlsx", options);

See Also