Hi
Thank you for your answer.
I want to send mail for similar question.
I tested more about getPlanStart, getActualFinish function.
So I can get a different result.
When the cell has no value, getPlanStart function get a specific value like below
but getActualFinish get no value.
Why Two functions have different way to get a value?
If I delete planStart date and MS Project has background value. I must find another way to manipulate it.
Have a nice day.
[ answer mail]
Hi Dongsoon,
Further I created a new sample MPP file using MSP , created few tasks with proper start dates and saved the file. Then again opened the file in MSP and deleted the start date and saved it on disc. When I read the same file using Aspose.Tasks and VSTO, it was displaying the same start date which was actually deleted from the MPP in MSP. This shows that although MSP shows empty start date column but it maintains the date at backend so its not an issue in Aspose.Tasks but some sort of inconsistency in MSP.
Thank you for writing to Aspose support.
I have analyzed the sample file and following are my findings:
- Converted the "R1212017_01.mpp" to XML format using Microsoft Project 2013 (MSP) and observed the task id 3. It was having start date 2012-09-20T08:00:00.
- The converted XML file is opened in MSP and it showed the same start date 2012-09-20.
- For further analysis I used VSTO to display the project data as given below and its observed that it displays the same start date 2012-09-20.
static void DisplayStartDateInterop()
{
//Create Application object
Application projectApplication = new Application();
object missingValue = System.Reflection.Missing.Value;
//Open an MPP file
projectApplication.FileOpenEx(@"D:\Aspose\R1212017_01\R1212017_01.mpp",
missingValue, missingValue, missingValue, missingValue,
missingValue, missingValue, missingValue, missingValue,
missingValue, missingValue, PjPoolOpen.pjPoolReadOnly,
missingValue, missingValue, missingValue, missingValue,
missingValue);
//Create a Project object by assigning active project
Microsoft.Office.Interop.MSProject.Project project = projectApplication.ActiveProject;
//Loop through each task and read information related to tasks
foreach (Microsoft.Office.Interop.MSProject.Task task in project.Tasks)
{
if (task.ID == 3)
{
Console.WriteLine("Reading Task " + task.Name);
Console.WriteLine("\nID: " + task.ID);
Console.WriteLine("Start: " + task.Start);
Console.WriteLine("Finish: " + task.Finish);
Console.WriteLine("\n===========================\n");
}
//Read any other information you need
}
}
{
//Create Application object
Application projectApplication = new Application();
object missingValue = System.Reflection.Missing.Value;
//Open an MPP file
projectApplication.FileOpenEx(@"D:\Aspose\R1212017_01\R1212017_01.mpp",
missingValue, missingValue, missingValue, missingValue,
missingValue, missingValue, missingValue, missingValue,
missingValue, missingValue, PjPoolOpen.pjPoolReadOnly,
missingValue, missingValue, missingValue, missingValue,
missingValue);
//Create a Project object by assigning active project
Microsoft.Office.Interop.MSProject.Project project = projectApplication.ActiveProject;
//Loop through each task and read information related to tasks
foreach (Microsoft.Office.Interop.MSProject.Task task in project.Tasks)
{
if (task.ID == 3)
{
Console.WriteLine("Reading Task " + task.Name);
Console.WriteLine("\nID: " + task.ID);
Console.WriteLine("Start: " + task.Start);
Console.WriteLine("Finish: " + task.Finish);
Console.WriteLine("\n===========================\n");
}
//Read any other information you need
}
}
Please feel free to write us back if you have any other query related to Aspose.Tasks.