View Full Version : Solved: Pulling Data From MS Project Into Excel

07-31-2006, 05:53 AM
hi all - has anyone had any experience interfacing Excel & MS Project?

I'm trying to create a report, that will pull resource data into excel from MS Project.. i've found some sample vba code that spits data out of project to excel, but only when you're in / using ms project - and then it dumps it into a new worksheet.

But the whole thing's 'the wrong way round', and no amount of tweaking seems to make it work. (we've had 3 of us crowded round a screen, offering ideas on this one!)

In base terms, what i need to do is this :-

a) prompt users to 'browse' for the relevant project .mmp file
b) pull out of the file, all the 'resource used' data from the .mmp (without opening)
c) drop all data found (in plain text) into a new worksheet for further processing

has anyone got any ideas / seen examples / ever done this??

:dunno there seems to be relatively little info available about mixing excel & project....




07-31-2006, 07:47 AM
Not sure if this would help you or not but here is some code courtesy of C Pearson that reads tables in MS Project from Excel:

Dim MSProj As MSProject.Application
Sub CopyTasksToExcel()
Dim Tsk As MSProject.Task
Dim DestCell As Range
If MSProj Is Nothing Then
Set MSProj = New MSProject.Application
End If
MSProj.FileOpen Name:="c:\Test\Test1.mpp"
Set DestCell = Range("A1")
For Each Tsk In MSProj.ActiveProject.Tasks
DestCell.Value = Tsk.Name
Set DestCell = DestCell(2, 1)
Next Tsk
End Sub

Also another option might be:

in Project 2002 onwards you can save a project as a .xml file, or
in any version you can save to .mdb or any odbc database. You could then
read data directly from it.


07-31-2006, 09:13 AM
cool! that kinda works! thanks for the baseline to work from!


07-31-2006, 10:25 AM
Glad it worked for you. :thumb