Professional Documents
Culture Documents
GUIDE TO EXCEL
How to use these two powerful tools
together to maximize your productivity
and reporting.
Table of Contents
Chapter 1: Why Primavera P6 and Excel
Chapter 2: Excel VLOOKUP Tutorial
Chapter 3: P6XL Bridge helps you
manipulate P6 data in Excel
Chapter 4: How to Import WBS from Excel
to Primavera P6 using the SDK
Chapter 5: Using Primaveras .xer File
Parser Import WBS from Excel
Without the SDK
CHAPTER ONE
Introduction: Why Primavera 6
And Excel Are Better Together
CHAPTER TWO
EXCEL VLOOKUP TUTORIAL
When you choose VLOOKUP function in Excel, you should complete the
following inputs:
Lookup_value: This is the value that is common between our arrays
and we use it to find our desired value. In this example both arrays
have Documents numbers in common, so we use this value as our
look up value.
Table_array: In here we should input the address of our main array
that have desired information in it and in which data is retrieved. We
will see how we should insert the cell address in here.
Col_index_num: This number is the column number in our main
array in which our desired data is located. You should notice that
this number starts from one for the first column in the array that you
have chosen in the previous section, so you should count columns
to find your result column and input the number in here. In our
example %Complete is located in fifth column so we should input 5
in this part.
Range_lookup: In this part you have two logical TRUE and FALSE
options and each one have different meanings in the formula. If you
put TRUE the function search for the closest match in the array and
you should note that the search is in the ascending order. If you
leave this section blank, it works like you put TRUE in it. FALSE means
you need to find an exact match in the array, so this option is more
accurate and reliable and I prefer this one because sometimes
especially when you search some numbers, using TRUE makes you
confused.
Now lets get back to our example. The Lookup_value for our example is
Activity IDs in the primavera table which is called Document Number in the
database table. Our Table_array starts from the first column in the
database table and ends on %complete column which is our desired
column for getting the result. Col_index is the column number of
%complete column which is 5. For getting the most accurate result lets
put the FALSE in the Range_lookup.
8
So our formula is
like this:
As you can see for the Table_array amount, the address of cells in the
array has been inserted completely, rows and columns, sheet name and
even file name is identified. In Excel wherever you see $ sign it means that
amount is fixed and if you drag the formula it is not going to be changed,
so here the column and the row are both fixed and when you drag the
formula for the rest of activities your array is the same but otherwise if you
have not $ sign in there and you drag the formula the next one would
starts from column C and row 2 till column F and row 32.
Tips
For using VLOOKUP function there are some tips that you should consider
them:
1. Always your lookup value should be in the first column of your table
array. If you do not obey this rule the formula wont work for you. In
our example the formula searches the Document Number column
to find out our Activity IDs and return their %complete and this
column is the first one in the selected array. Sometimes you have to
replace columns to put your look up value in the first place of the
array.
2. When your lookup value is a text instead of numbers the format of
tables are important and you need to make them similar to each
other, then the formula can find the result.
3. After writing the formula and drag it for all the cells of the column,
maybe the result would appear in another category. In our example
if I havent set the category of percentage for Activity % complete
column in primavera table, the data could be appeared in the
decimal number format. Therefore, you need to be sure that you set
the proper format for that column.
4. You remember that in the table_array part of the formula when you
choose the array by dragging on the cells, the complete address of
the array apppears in the formula. On the other hand, most of the
time your result is getting from a different file. Sometimes when you
close and save both files and then change the place of the reference
file (in our example database file) in your computer the formula gets
confused and gives you errors. Consequently you may lose your
results. I prefer to copy and paste the value of formula after checking
that it has worked correctly. So it doesnt matter where Im going to
save the reference file and the next time when I open the main file,
the lookup values are on their place in the file and I have them.
10
Conclusion
VLOOKUP is one of the most useful functions in Excel especially for
planners and it helps you to save your time and have many updated
spreadsheet for either importing to primavera or preparing reports and
charts by them. But you should consider the tips and always check the
results randomly to be sure that the formula has worked correctly,
because this function has many dependencies and if you miss to obey all
the rules you may get the wrong results, but when you get used to it, there
wont be any error and you just enjoy its quickness.
11
CHAPTER THREE
P6XL BRIDGE HELPS YOU
MANIPULATE P6 DATA IN EXCEL
12
13
The following assets were used during the production of this tutorial.
Sample Project.xer
14
Locate the sample project and open it by typing Open under Changes
(column E) on the same row as your project. In the case below, this is cell
E5. Then click the Update button. Now your project is open in the Bridge.
15
Go the ACTVCODE sheet and notice that the code value that we
discovered in P6 under our Sample Activity Code is already there.
Start typing (or copy and paste) the desired code values as below. Notice
the Insert command will appear automatically. Fill 3 columns: the short
name, the long name, and the parent code ID. When done click on the
Update button. Your codes are now created in P6.
16
Take note of the resulting code value IDs, as highlighted below. We will use
that later.
Go to the ACTVCODE
sheet. Copy the activity
code
value
IDs
as
highlighted in the above
step into the TASKACTV
table in the Interface sheet
3 times as indicated below.
Notice
the
commands will
automatically.
17
Insert
appear
18
Finally,
fill-down
the activity code ID
and project ID
columns.
Then
click the Update
button to get the
result below.
19
Wrap Up
This tutorial demonstrates the power of managing P6 data using Excel
directly. We do this by using the P6XL Bridge which communicates with the
P6 database live without importing. In this demonstration, we used a
concrete example of assigning activity codes to a sample project.
Things for you to try:
Delete the code assignments from the TASK table and try to reassign them
again from there without using the TASKACTV table for Activity Code
Assignments.
What else you should know about the P6XL Bridge:
The Bridge can copy and move projects between EPS nodes. It can
also delete projects and other data.
The Bridge facilitates using Excel formulas so you can manipulate P6
data according to your business needs.
For advanced users, the Bridge includes a facility for cycling through
projects to make predefined changes.
Advanced users can also repackage and repurpose the P6XL Bridge
functionality to create interactive reports.
21
CHAPTER FOUR
HOW TO IMPORT WBS FROM
EXCEL TO PRIMAVERA P6
USING THE SDK
22
23
When the
wizard screen
comes up,
select
Delimited, and
click Next.
24
Make sure
to format
the
columns as
Text (if your
code is 01,
Excel
will
keep it 01
as
text,
otherwise it
will change
to 1.
25
26
The green L-columns contain some text formulas that will recombine part of the WBS
Path to build parent and children fields that well need for the import.
Step 4 Organize the WBS by Parent & Child
Were
going
to
combine all of the
green
L-columns
now on Worksheet 4.
Start by copying the
data under green-L1
and pasting it to the
Parent column on
Worksheet 4. Copy
the green-L2 data
and paste it to
the Child column on
Worksheet 4.
27
The next steps might seem unintuitive, but they are important to follow correctly. Well
then clean things up afterwards.
Copy the data as follows:
Copy the green-L2 data again and this time paste it to the bottom of the data in
the Parent column on Worksheet 4
Copy the green-L3 data and paste it to the bottom of the Child column on
Worksheet 4
Copy the green-L3 data again and this paste it to the bottom of the Parent
column
Copy the green-L4 data and paste it to the bottom of the Child column
Copy the green-L4 data again and this paste it to the bottom of the Parent
column
Copy the green-L5 data and paste it to the bottom of the Child column
Essentially the column data should be combined like this:
Parent col Child col
L1 data
L2 data
L2 data
L3 data
L3 data
L4 data
L4 data
L5 data
Actually thats the most important step in this tutorial, in order for the SDK (a relational
database) to understand the structure of the WBS; this one must be presented as
Parent and children table.
28
29
Next, select ok
30
31
Youll want to have an empty project already setup in P6 that we will import to. If you
dont have one, login to Primavera and create an empty project now, then come back
to this step.
By default, the first level of the WBS is the name of the project.
In this case change the name of the project to SAMPLE, once you finish importing you
can modify the name.
32
As expected, only the WBS root node is imported into the spreadsheet.
Copy and paste from the Excel file the columns Parent WBS ID, WBS Code and the
WBS Name
Dont overwrite the root node that is already there.
33
It will take some time to process the data (the SDK is famous for very being slow).
34
Step 9 Enjoy
Wrap Up
We explained how to import a WBS dictionary to Primavera P6 using Excel and the P6
SDK. Here are some examples as to why it is very useful for planners:
1. It is very easy to import a standard WBS into your schedule (perhaps your
company Cost breakdown Structure).
2. If your schedule is using activities codes, you can easily generate WBS in Excel
and imported back to P6.
3. You can design a first cut of your WBS outside Primavera, using many freely
available WBS utilities. Once it is approved, it can easily be imported to
Primavera. We suggest you try WBStool, a mind mapping WBS tool. All WBS or
mind mapping tool can export the WBS path to Excel, which means this file can
be used as an integration tool to Primavera.
35
36
CHAPTER FIVE
USING PRIMAVERAS .XER FILE
PARSER IMPORT WBS FROM
EXCEL WITHOUT THE SDK
37
In the previous chapter, we learned how to how to import WBS from Excel to
Primavera P6 using the SDK. In this chapter we explain how to import a WBS dictionary
in Primavera P6 without the SDK
To load the WBS data into Primavera P6, instead of using the SDK we will use the XER
File Parser utility provided by Oracle. Essentially, the File Parser is an excel file that can
read the data contained in a .xer file, and gives the user the ability to modify some
information and to build a new .xer.
It is definitely one of the most powerful utilities for Primavera P6, either standalone or
enterprise, and it is much safer to use than the SDK, as you dont write directly to the
Primavera database unlike the SDK.
Tutorial Files
Complete this tutorial by downloading the following files:
P6xerFileParserBuilder.xls - MS Excel 2003 and prior
xerFileParserBuilder_2007 - MS Excel 2007 and later
WBS_id_Generator.xls
Primavera P6 has a well-defined database at its core, but you dont need to be an IT
graduate to understand how it works. Heres what you DO need to know:
Understand what a Primary Key is used for
Understand what a Foreign Key is used for
Understand the type of relationships between tables in the database
I recommend googling the terms above. There are a lot of courses available on
database structures.
The descriptions of the tables of Primavera P6 r8.2 database tables are available
here. It can be very useful to understand how the P6 database is organized (WBS,
Activity Codes, Resources, etc.)
Also, here are some best practices on working with the XER File Parser utility:
Always work on a copy of the .xer file, and make sure to always build a new .xer
file.
Never directly update a program from a modified .xer file, first import it as a
separate project, and check if everything is ok, then you can update your
program.
Never import any .xer file directly to a production database; it is too easy to
contaminate P6 global data objects. Import to a test database first.
Create
a
blank
dummy schedule in
P6 dont add any
WBS
or
activities. Export the
blank schedule to
.xer format.
The
purpose is to have a
.xer file with minimal
data.
For the purposes of this tutorial, the name of the schedule is Test, and the WBS code,
is Sample Oil, Gas WBS.
39
Step 2 Open the Xer file using the Excel Parser Utility.
Open the Excel XER File Parser spreadsheet. Click on Load XER file, select TEXT.xer file
then click OK.
Heres what you should see. The table for the WBS dictionary is called PROJWBS.
Click the PROJWBS link to edit WBS data.
40
Now copy the data in yellow from the Excel file done in the previous tutorial.
The primary key for the table PROJWBS is wbs_id. We generate a new wbs_id for the
new WBS. Please notice for the first wbs_id we add 100 (40484 40584) then we
increase the number by 1.
Then for the column Parent_wbs_id, by using a VLOOKUP formula, we can find the
corresponding wbs_id for the Parent.
41
Step 3 Build the new xer file with the new WBS.
Now all what we have to do is fill the columns with the data of the WBS.
Wbs_id, wbs_short_name, wbs_name, parent_wbs_id; copy in the values from the
WBS_id_Generator.xls.
Proj_id, obs_id, sum_data_flag, status_code, ev_user_pct, ev_etc_user_value,
orig_cost, indep_remain_total_cost, ev_compute_type, ev_etc_compute_type ;
copy and keep the same data from the first row
proj_node_flag : all rows have the value N.
seq_num : copy the same value to any new rows (which is first value +100)
Guid : this is another primary key generated by the database, for any new rows
leave this column empty.
Dont add anything to columns with empty values.
Now click on Build XER file. Select a new file name (TEST1) then click on OK.
Voila, now you have a new .xer file, loaded with the WBS dictionary. You can now
import that file to your P6 database. But remember to have a look at it on a test
42
database first dont import it to a Production database until youve checked the
import works.
Wrap Up
The XER File Parser is a must-have utility for any planner especially if he deals with
external schedules. In this tutorial we showed only one particular use, but this utility
has much broader use.
But who knows, perhaps one day Primavera will add the facility to copy and paste from
Excel other Planning software can do it, so why not P6?
43
44