How to read .xer file extension (Primavera P6 project files ) from Aspose

Hello Team,


My requirement is to read .xer files (mainly used by Primavera P6 project files). Is it possible to read .xer files from Aspose?

Thank you,
Kiran
Hi Kiran,

Thank you for your inquiry and considering Aspose.Tasks.

It is possible to read .xer using Aspose.Tasks. Following is the simple code to achieve the task. For details, please go through the online documentation Aspose.Tasks for .NET.

CODE:

Aspose.Tasks.Project objProj = new Aspose.Tasks.Project(@"myfile.xer");

Hello Ikram,


Thank you very much for your help and time. I want to ask you that is it possible to read tables along with table field values from Aspose for .xer files. I tried in following way but it is giving only field names and not values.

<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>Aspose.Tasks.Project objProj = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Aspose.Tasks.Project(@“myfile.xer”);
TableCollection collection = <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>objProj.Tables;

foreach (var table in collection)
{
TableField field = table.TableFields[0];
}

For example my .xer file has data from table named “projweb” and it has field name “wbs_id”. How can I read the same from <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>TableCollection .

Is it possible to read all tables along with all column names and respective values ?

Thanks & Regards,
Kiran
Hi Kiran,

Thank you for writing us back.

Please share a sample .xer file that contains table, columns, field names and values as mentioned in your inquiry. We will evaluate it at our end and update you accordingly.

Hi Ikram,


Please find attached .xer file.

Thanks & Regards,
Kiran
Hi Kiran,

Thank you for sharing sample.

We have investigated the issue at our end. Initial investigation shows that the issue persists. The issue has been logged into our system with ID TASKSNET-1928. Our product team will further look into it and provide feedback. We will update you with the feedback in this thread once available.

@DAHPlan,

This is to update you that Project.Tables collection is used only for MPP format. Tables in XER file cannot be directly mapped on MSP format. If you want to read the “wbs_id” field of the “projweb” table in your sample file “PP_T4.xer”, you may use the following code snippet.

CODE:

Aspose.Tasks.Project objProj = new Aspose.Tasks.Project(@"PP_T4.xer");

Console.WriteLine(objProj.RootTask.Get(Aspose.Tasks.Tsk.Uid));
foreach (var table in objProj.RootTask.Children)
{
       Console.WriteLine(table.Get(Aspose.Tasks.Tsk.Uid));
}

This will show the output:

27967
27968
27969
27970