aspose file tools*
The moose likes Other Open Source Projects and the fly likes Read a MSProject 2007 with mpxj Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Read a MSProject 2007 with mpxj" Watch "Read a MSProject 2007 with mpxj" New topic
Author

Read a MSProject 2007 with mpxj

Nohelia Lancy
Greenhorn

Joined: Mar 27, 2008
Posts: 3
Hello I'm new in MPXJ (I don't speak english either). I've been looking for a code that could show me how to read a simple MSProject 2007, but I couldn't find it. Can anyone PLEASE help me and show me what I have to do.

Thanks a lot
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42594
    
  65
Hello "nolapiece"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, the source code that comes with the mpxj distribution includes a class called net.sf.mpxj.sample.MpxjQuery that shows how to read a project file and extract some data items. That should be a good starting point.


Ping & DNS - my free Android networking tools app
Nohelia Lancy
Greenhorn

Joined: Mar 27, 2008
Posts: 3
Hello Ulf Dittmer, thanks for the help. Now I have another problem. I'm working with JDeveloper 10.1.3.2, sdk 5 and when I try to compile the code that came with the mpxj distribution I keep getting the same errors. That's why I can�t continue testing. The first time I compile there's no problem, but when I rebuild the MpxjQuery class I get this errors:

Error(113,13): Resources$Resource not found in class net.sf.mpxj.mspdi.MSPDIReader in class net.sf.mpxj.sample.MpxjQuery
Error(113,13): Calendars$Calendar not found in class net.sf.mpxj.mspdi.MSPDIReader in class net.sf.mpxj.sample.MpxjQuery

And when I go to MSPDIReader class and compile it I get all this errors:


Error(256,15): Calendars$Calendar not found in class net.sf.mpxj.mspdi.schema.Project.Calendars in class net.sf.mpxj.mspdi.MSPDIReader
Error(320,15): Calendars$Calendar$WeekDays$WeekDay not found in class net.sf.mpxj.mspdi.schema.Project.Calendars.Calendar.WeekDays in class net.sf.mpxj.mspdi.MSPDIReader
Error(400,85): Calendars$Calendar$WeekDays$WeekDay$WorkingTimes$WorkingTime not found in class net.sf.mpxj.mspdi.schema.Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes in class net.sf.mpxj.mspdi.MSPDIReader
Error(436,15): ExtendedAttributes$ExtendedAttribute not found in class net.sf.mpxj.mspdi.schema.Project.ExtendedAttributes in class net.sf.mpxj.mspdi.MSPDIReader
Error(494,15): Resources$Resource not found in class net.sf.mpxj.mspdi.schema.Project.Resources in class net.sf.mpxj.mspdi.MSPDIReader
Error(625,12): Resources$Resource$OutlineCode not found in class net.sf.mpxj.mspdi.schema.Project.Resources.Resource in class net.sf.mpxj.mspdi.MSPDIReader
Error(625,12): Resources$Resource$Baseline not found in class net.sf.mpxj.mspdi.schema.Project.Resources.Resource in class net.sf.mpxj.mspdi.MSPDIReader
Error(625,12): Resources$Resource$ExtendedAttribute not found in class net.sf.mpxj.mspdi.schema.Project.Resources.Resource in class net.sf.mpxj.mspdi.MSPDIReader
Error(643,15): Tasks$Task not found in class net.sf.mpxj.mspdi.schema.Project.Tasks in class net.sf.mpxj.mspdi.MSPDIReader
Error(919,15): Tasks$Task$OutlineCode not found in class net.sf.mpxj.mspdi.schema.Project.Tasks.Task in class net.sf.mpxj.mspdi.MSPDIReader
Error(919,15): Tasks$Task$Baseline not found in class net.sf.mpxj.mspdi.schema.Project.Tasks.Task in class net.sf.mpxj.mspdi.MSPDIReader
Error(919,15): Tasks$Task$ExtendedAttribute not found in class net.sf.mpxj.mspdi.schema.Project.Tasks.Task in class net.sf.mpxj.mspdi.MSPDIReader
Error(919,15): Tasks$Task$PredecessorLink not found in class net.sf.mpxj.mspdi.schema.Project.Tasks.Task in class net.sf.mpxj.mspdi.MSPDIReader
Error(985,15): Assignments$Assignment not found in class net.sf.mpxj.mspdi.schema.Project.Assignments in class net.sf.mpxj.mspdi.MSPDIReader
Error(1000,18): Assignments$Assignment$Baseline not found in class net.sf.mpxj.mspdi.schema.Project.Assignments.Assignment in class net.sf.mpxj.mspdi.MSPDIReader
Error(1000,18): Assignments$Assignment$ExtendedAttribute not found in class net.sf.mpxj.mspdi.schema.Project.Assignments.Assignment in class net.sf.mpxj.mspdi.MSPDIReader


I would appreciate the help ...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42594
    
  65
Please fix your display name like you were asked to do. This is not optional - accounts with invalid screen names are generally closed.
Nohelia Lancy
Greenhorn

Joined: Mar 27, 2008
Posts: 3
Updated as requested
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read a MSProject 2007 with mpxj