Field.OutlineCode not working when saving to xlsx

Hi
Im trying to export mpp to excel.
new GanttChartColumn(“X”, 100, Field.TaskOutlineCode2),
new GanttChartColumn(“Y”, 100, Field.TaskOutlineCode1),

Same with
new GanttChartColumn(“Z”, 100, Field.TaskResourceInitials),

Everything works, but I don’t get values there.

Any suggestions?

Thanks
Johannes

@johannesmichael,

I have observed the issue shared by you and request you to please share the source and generated files along with used sample code reproducing the issue. Please also first try using latest Aspose.Tasks for .NET 20.2 on your end.

@mudassir.fayyaz,

I am on 20.2. Working with a test license file.

Here the code:

using System;
using System.Collections.Generic;
using System.IO;
using Aspose.Tasks;
using Aspose.Tasks.Saving;
using Aspose.Tasks.Visualization;


namespace MPP2XLS
{
    public class UsingXlsxOptions
    {
        public static void Main()
        {
            Aspose.Tasks.License license = new Aspose.Tasks.License();
            license.SetLicense("C:/01_IN/Aspose.Tasks.lic");
            // The path to the documents directory.
            string dataDir = "C:/01_IN/";
            string dataFile = "Projekt1";
            string dataFormat = ".mpp";

            // ExStart:UsingXlsxOptions
            // Read the input Project file
            Project project = new Project(dataDir + dataFile + dataFormat);
            project.Set(Prj.DateFormat, DateFormat.DateDdMmYyyy);
            

            //  add the columns to be exported
            var columns = new List<ViewColumn>
                    {
                        new GanttChartColumn("UniqueId", 20, Field.TaskUniqueID),
                        new GanttChartColumn("Name", 150, Field.TaskName),
                        new GanttChartColumn("Start", 100, Field.TaskStart),
                        new GanttChartColumn("End", 100, Field.TaskFinish),
                        new GanttChartColumn("R-Initials", 100, Field.TaskResourceInitials),
                        new GanttChartColumn("R-Names", 100, Field.TaskResourceNames),
                        new GanttChartColumn("Work", 50, Field.TaskWork),
                        new GanttChartColumn("Code2", 100, Field.TaskOutlineCode2),
                        new GanttChartColumn("Code1", 100, Field.TaskOutlineCode1),
                        
                        new GanttChartColumn("UniqueID-Pre", 100, Field.TaskUniquePredecessors),
                       new GanttChartColumn("UniqueID-Suc", 100, Field.TaskUniqueSuccessors),

                    };
            XlsxOptions options = new XlsxOptions
            {
                View = new ProjectView(columns),
               
                PresentationFormat = PresentationFormat.GanttChart
            };
            CsvOptions csvOptions = new CsvOptions
            {
                View = new ProjectView(columns),
                PresentationFormat = PresentationFormat.GanttChart
            };



            project.Save(dataDir + dataFile +"_OUT.xlsx", options);
            project.Save(dataDir + dataFile + "_OUT.csv", csvOptions);
            // ExEnd:UsingXlsxOptions
        }
    }
}

By the way, the Unique-ID predecessor and successor columns are not working too…

How can I send you the mpp file?

Thanks for helping.

@johannesmichael,

Thank you for sharing the sample code and issue details with us. You can zip and upload the MPP file here in this thread if that has size less than 3MB. Otherwise, you may please host the file on any file server or Dropbox/Google drive and share download link with us.

@mudassir.fayyaz

Thanks for helping.

This is a sample file with just 2 tasks and an outlinecode.
But doesn’t work here too…

Projekt1.zip (25.7 KB)

@johannesmichael,

I have worked with the sample file shared. An issue with ID TASKSNET-3899 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as TASKSNET-3899) have been fixed in this update.