Laura McA said:
I want to export Resource Utilization information to Excel.
I want to see Reource Name, with each project assignment by month (columns)
with %Allocated.
I have tried a number of maps and export options but can't seem to figure it
out.
Laura,
You are posting in the developer newsgroup but the methods you describe
sound like you are not using VBA. You can certainly get there without
VBA but it won't be the most efficient method. For example, you want to
export two types of data - static (Project field) and timescaled (%
allocated). To export the static data, use an export map. To export the
timescaled data, use the "Analyze timescaled data in Excel"
utility/add-in. Then combine the two Excel Worksheets into one.
On the other hand if you are trying to use VBA, the TimeScaleData Method
is what you want, probably by assignment since you also want to see the
project (I assume you have a master file with inserted subprojects). I
would set up a loop for all resources and then loop through each
assignment of each resource. Use the Project Property and TimeScaleData
Method to extract the desired data. The basic code might look something
like this:
Sub ResAllocation()
ViewApply Name:="resource sheet"
SelectResourceColumn
[open and activate Excel]
Set Area = ActiveSelection.Resources
For Each r In Area
If Not r Is Nothing Then
Who = r.Name
For Each A In r.Assignments
What = A.Project
HowMuch = A.TimeScaleData(StartDate, _
EndDate, pjAssignmentTimescaledPercentAllocation, _
pjTimescaleMonths)
[dump into Excel on the fly]
Next A
End If
Next r
End Sub
Hope this helps.
John
Project MVP