Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read a MSProject 2007 with mpxj

 
Nohelia Lancy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nohelia Lancy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Updated as requested
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic