Microsoft Project MPP File Update in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Update Project File
To Update Project File using Aspose.Tasks Java for Ruby, simply invoke UpdateProjectFile module. Here you can see example code.
Ruby Code
1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2task = project.getRootTask().getChildren().add("Task1")
3cal = Rjb::import('java.util.Calendar').getInstance()
4cal.set(2015, 7, 1, 8, 0,0);
5task.set(Rjb::import('com.aspose.tasks.Tsk').START, cal.getTime())
6cal.set(2015, 7, 1, 17, 0, 0)
7task.set(Rjb::import('com.aspose.tasks.Tsk').FINISH , cal.getTime())
8project.save("AfterLinking.mpp", Rjb::import('com.aspose.tasks.SaveFileFormat').MPP)
9puts "Project file updated, please check the output file."
Download Running Code
Download Update Project File (Aspose.Tasks) from any of the below mentioned social coding sites: