You are on page 1of 50

Plan Academy stores cookies on your computer.

These cookies are used to provide website functionality, improve


your experience and provide personalized services to you, both on this website and through other media.

To find out more about the cookies we use, see our Privacy Policy.

You accept the use of cookies by closing or dismissing this notice, by clicking a link or button or by continuing to
browse otherwise.
ACCEPT

 Subscribe

 Search
 Courses
o Full Course List
o Primavera P6 Professional
o Advanced P6 Schedule Building
o Construction Planning & Scheduling
o Forensic Schedule Delay Analysis
o Analyze P6 Schedules with ScheduleReader
 Training for Teams
 Software
o ScheduleReader for P6
o ScheduleCleaner for P6
o Microsoft Project Viewer
 Community
   Video Channel
 Blog
   Login
Blog > Excel > How To Import WBS From Excel To Primavera P6 Using The SDK

How To Import WBS From Excel


To Primavera P6 Using The SDK
JANUARY 5, 2012 BY MIMOUNE DJOUALLAH 37 COMMENTS
  Share on Facebook   Share on Twitter 

In this tutorial we explain how to use the Oracle Primavera P6

SDK to import a WBS from Excel to Primavera P6. We are using the

WBS.xls P6 SDK spreadsheet made available by Oracle Support.

The SDK is a very handy tool, but the data must exactly respect

the required format, we used a sample WBS and a step-by-step

guide to prepare the data to be imported. We assume you already

have the Primavera SDK installed.

Tutorial Assets
The following assets were used during the production of this

tutorial.

 WBS-Import-P6-Tutorial.xls
 WBS.xls

Step 1 – Copy the WBS from to Excel


For simplification, every step of the tutorial has its own Excel

worksheet in the spreadsheet (see WBS-Import-P6-Tutorial.xls in

Tutorials Assets). I’ve numbered each worksheet appropriately.

For this tutorial, we’re using a sample WBS from this site.  We’ve

already cleaned-up and pasted it for you into the WBS-Import-P6-

Tutorial.xls on Worksheet 1.

I have modified the original WBS to add a root node (SAMPLE –

the first entry in the WBS list) as the project name.


Step 2 – Split the WBS Path into
Distinct Levels
Copy the column WBS Code from “Worksheet 1” to “Worksheet 2”

in Excel. We will use the Text to Columns function on the Excel

Data tab (Excel 2010), it a very easy tool to split one column by

delimiters into multiple columns.

Highlight the WBS Code column, and click on Text to Columns.


 

When the wizard screen comes up, select Delimited, and click

Next.

 
 

Set the delimiter to a dot “.” .

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.

 
 

Here’s the result.

 
 

Step 3 – Organize The WBS by Level.


Copy the new split columns to “Worksheet 3” and paste each

under the appropriate L1, L2, L3, L4 or L5 heading (use the yellow

L columns, not the green ones). If you have more levels, just

adjust the spreadsheet to add them in.

 
 

The Level column on Worksheet 3 is not needed for this tutorial. I

have just added it to show that we can determine the level of

each WBS by counting how many times the separator (or the

delimiter) is repeated.

 
 

The green L-columns contain some text formulas that will

recombine part of the WBS Path to build parent and children

fields that we’ll need for the import.

Step 4 – Organize the WBS by Parent


& Child
We’re 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.

 
 

 
The next steps might seem unintuitive, but they are important to

follow correctly. We’ll 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
Child col
col
L1 data L2 data
L2 data L3 data
L3 data L4 data
L4 data L5 data

Actually that’s 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.

Step 5 – Remove Duplicates


Copy the columns Parent and Child from Worksheet 4, and paste

them to Worksheet 5.

Highlight both columns. On the Excel Data tab, click Remove

Duplicates to clean up any duplicate entries we’ve created.

 
 

Next, select ok

In the column “check the same relation”, I put a formula to check

if there is the same item in parent and child.  Click the column
Filter and select only “No”. This will filter out any other entries we

don’t need for the import.

Step 6 – Separating Child and Parent


WBS Items
With the column filter still set to “No” highlight the Parent and

Child columns, copy and paste them to Worksheet 6 as follows:


 Copy the Parent column and paste under Parent WBS

ID

 Copy the Child column and paste under WBS ID CHILD

The WBS Code column is automatically generated by removing

from the WBS ID CHILD code the equivalent Parent WBS ID.

Now our WBS is ready to be imported to Primavera P6.

Step 7 – Open Primavera P6


In Admin -> Admin Preferences, check the maximum WBS Code

length that Primavera P6 can accept. The default of 20 will work


for this tutorial, however, you may want to increase this value to

30 or 40 characters for future imports.

You’ll want to have an empty project already setup in P6 that we

will import to. If you don’t 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.

Step 8 – Open The P6 SDK WBS.xls


As usual input the password, and click on Update Project List.

Select the empty project you created.  **Make sure you select the

right project.

Click on “Get WBS”.

 
 

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

Don’t overwrite the root node that is already there.

 
Click “Set WBS”.

It will take some time to process the data (the SDK is famous for

very being slow).

 
 

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.

 
Things for you to try:
 If you want to understand the logic behind all this data

processing, google “hierarchical database model”.

 Using CTE recursive query in any Database you can

generate the WBS Parent and WBS child in one

operation. But if you are just a planner, SQL might be

black magic for you (as it is for me). The approach

discussed in this Tutorial will do the trick, and will you

save a lot of time doing what all planners hate the most

– manual typing.

Filed Under: Excel, Import / Export, Planning, Primavera P6 TutorialsTagged With: SDK, WBS

Subscribe to Plan Academy's Primavera P6


Blog
Join 1000's of fellow Project Controls Professionals!
Get Plan Academy's latest articles straight to your inbox. Enter your work email address
below:

Yes, I want to subscribe to Plan Academy's articles by email.*


We will handle your contact details in line with our  Privacy Policy. If you ever want to stop
getting emails from Plan Academy, you can opt-out of all communications located at the
bottom of each email.

Subscribe
About Mimoune Djouallah
Mimoune is a Project Controls Engineer with solid Planning and

Cost experience in Oil/Gas EPC projects, Drop him a line at

mimoune.djouallah@gmail.com

Comments

1. Sergio says:

February 02, 2012 at 5:18 pm

Does SDK comes in P6 professional r8.x stand-alone

installation? It seems that I don’t have it in my installation

files.

Reply

2. Sergio says:

February 02, 2012 at 5:18 pm


Does SDK comes in P6 professional r8.x stand-alone

installation? It seems that I don’t have it in my installation

files.

Reply

3. Mimoune Djouallah says:

February 03, 2012 at 1:00 am

Sergio

there is instruction how to install the sdk for P6 here

http://www.pmsite.com/Forum/tabid/159/aft/1138/Default.aspx

but just a caution, do not install the sdk in a production

environment, the sdk is very powerful yet very dangerous,

as it has access directly to P6 database

Reply

4. Mimoune Djouallah says:

February 03, 2012 at 1:00 am


Sergio

there is instruction how to install the sdk for P6 here

http://www.pmsite.com/Forum/tabid/159/aft/1138/Default.aspx

but just a caution, do not install the sdk in a production

environment, the sdk is very powerful yet very dangerous,

as it has access directly to P6 database

Reply

5. Sergio says:

February 06, 2012 at 6:50 pm

thanks Mimoune, you’re truly a primavera ninja.

Reply

6. Sergio says:

February 06, 2012 at 6:50 pm

thanks Mimoune, you’re truly a primavera ninja.


Reply

7. Bruno Sena says:

May 14, 2012 at 11:35 am

Minoune my hero,

Greetings from Brazil !

Listen, I´ve tried to use the SDK excel files in Windows 7 64

bits edition, Office 2010 and Primavera 8.1 release but no

success so far.

I always receive a error message (connection error) in

process of logon.

I already installed the PMSDK BD with success.

There are a little trick to do this thing works ?

Can you help ?

Regards,

Bruno.
Reply

o Mimoune Djouallah says:

May 16, 2012 at 2:27 pm

Hi Bruno

Installing the SDK is a hectic experience, for example, I

made the stupid mistake of updating primavera to

revision 8.2, now the SDK is no more working, I am

sorry that I am not really helpful.

Reply

8. Bruno Sena says:

May 16, 2012 at 3:12 pm

Master Mimo,

Here in Brazil, we have a forum to discuss planning

techniques and other subjects with almost 6.500 users.

Today I posted a question about this problem, but so far I

received no reply.
Man, this problem is really sucks.

Follow my post :

Did someone managed to log on the worksheets that make

up the SDK, accessing the BD P6 8.2 in Windows 7 ?

I could see that : when Windows version is XP, the ODBC

driver who is responsible for connecting P6 is usually

installed and is available in ADMINISTRATIVE TOOLS / ODBC

DATA SOURCES / SYSTEM DATA SOURCES.

Thus, it allows any adjustments (if needed) in the alias of the

database refers to “public username” and “public

password”.

However, when Windows version is 7, despite having

installed the SDK BD (PMSDK), the ODBC driver is not

available in the path mentioned above. Thus there is no way

to establish the connection between Excel spreadsheets and

Primavera´s BD.

Someone has a solution to help ?

——–
So … in a configuration with windows xp + office 2010 (32

bits edition) + Primavera 8.2 = connection works fine !

I already tested this configuration and works fine with no

errors regarding connection problems.

Mimo, I think the problem is not with any version of

Primavera. I´m really convinced that the problem is with

version of Windows.

But … I has a friend with the follow configuration : windows

7 (32 bits edition) + Office 2007 + Primavera version 7. This

configuration works very well. According him, he tested the

same configuration changing only the Primavera´s version

to 8.1. Works fine too !

Well …

My configuration : Windows 7 (64 bits edition) + Office 2010

(32 bits edition) + Primavera 8.2 = nothing working.

No SDK spreadsheets accessing the Primavera´s BD …

Reply
o PlannerTuts says:

May 17, 2012 at 8:18 am

Hi Bruno,

I did a quick search on Oracle Support and found this

info. It seems the Win7 security is a bit different. Hope

it helps.

Additional security in Windows 7 conceals


the "Primavera P6 SDK" data source from
users until the 'ODBC Data Source
Administrator' is launched directly from
the C:WindowsSyswow64 folder using the
'Run as Administrator' option.
Solution

There are 2 methods of verifying that the


Primavera Software Development Kit (SDK)
has been installed:

1) Launch Windows Explorer, navigate to


C:WindowsSysWOW64 and locate odbcad32.exe

Right-click odbcad32.exe and select 'Run


as Administrator'.
This will open up the ODBC Data Source
Administrator.
Select the System DSN tab.
The Primavera P6 SDK data source will be
listed.

2) Go to Start, Run and execute Regedit.

Navigate to
HKey_Local_MachineSoftwareWow6432NodePrima
veraUniversalFrameworkDrivers
There should be a key folder called
"PrimaveraSoftwareDevelopmentKit"

Reply

9. Bruno Sena says:

May 18, 2012 at 2:08 pm

Thanks for your information but still not working …

Even after configuration (?) the ODBC parameters like you

told, I´m not connected …

The excel spreadsheets can´t log in Primavera´s BD.

Regards,

Bruno.

Reply

10. Michael Lepage says:

May 24, 2012 at 1:02 pm

Hi Bruno.
After a bit more digging, it seems there is a bug

NOTE: If using the SDK in a 64-bit environment the utilities

will not function if Microsoft Office is installed to the default

location of “C:Program Files (x86)…”

This causes an existing networking bug to occur where the

networking layer is unable to parse program locations that

contain parenthesis in the path to the executable which is

attempting to connect to Oracle.

Solution

To resolve this problem try either of the following solutions:

SOLUTION 1:

Use a version of the Oracle software that contains the fix for

Bug 3807408.

NOTE: Currently the following patches have been released

on Windows:

Windows 32-bit

9.2.0.7.0 Patch 6: Apply Patch 4928723 or later

10.2.0.1.0 Patch 4: Apply Patch 4923768 or later


10.2.0.2.0 Patch 5: Apply Patch 5383042 or later

10.2.0.3.0 or later contains the fix

Windows 64-bit AMD64 and INTEL EM64T

10.2.0.1.0 Patch 4: Apply Patch 4923787 or later

10.2.0.2.0 Patch 5: Apply Patch 5388871 or later

10.2.0.3.0 or later contains the fix

For previous versions on Windows please use SOLUTION 2

for now.

SOLUTION 2:

Find the location of the application that is generating the

error. Check the path to this location and see if it contains

any parenthesis. If so, you must relocate the application to a

directory without any parenthesis in the path.

Reply

11. Bruno Sena says:

May 28, 2012 at 8:35 am

Dear Michael Lepage,


Greetings from Brazil !!!

Man, you are my savior.

At last : it works !!!

I installed MSOffice in another directory and it worked

perfectly.

Thanks a lot …

My best regards Michael.

Bruno.

Reply

12. Michael Lepage says:

May 29, 2012 at 8:49 am

Bruno, you’re welcome. Perhaps you would consider signing

up for an account on support.oracle.com.

Regards,

Michael
Reply

13. Zak says:

September 20, 2012 at 3:33 am

Michael,

How to use a version of the Oracle software that contains

the fix for Bug 3807408? What do I need to install and run?

Your help is very much appreciated as I have been going

around for looong time to resolve this issue with SDK and

Windows 7 64bit.

Reply

14. Michael Lepage says:

September 20, 2012 at 10:43 am

Zak,

See my comment above in reply to Bruno. There’s a list of

patches or you can try to uninstall and reinstall MS Office or

MS visual studio so it is not in the C:Program Files (x64)


directory.

Hope that helps, let me know.

Reply

15. Mohammad says:

April 12, 2013 at 3:05 pm

Hi,

I am new to planning but spending a lot of effort watching

and reading. If you can refer me to a video that helps me in

leveling I would appreciate it.

Reply

16. Jericho says:

June 06, 2013 at 5:06 am

Sir Michael,

Can you give an insight how to link SDK to excel. ive already

install SDK with primavera.


your assistance will be a great help

Thanks and regards

Reply

17. Liam Gaudy says:

June 17, 2013 at 11:04 pm

Hello Jericho. I developed this tool in Excel that uses the SDK

to communicate to your P6 database. It is called the P6XL

Bridge, link below. Maybe it can be of use to you.

http://code.google.com/p/p6xl/

Reply

18. aji susilo says:

June 21, 2013 at 7:17 pm

Dear Mimoune,

I’ve did this tutorial step by step as mentioned but on step-8

i can’t get WBS from P6 SDK WBS.xls it is just showing error


report :

Row 0: ation is not allowed when the object is closed.

What should i do to solve this problem? your assistance will

be great help

Thanks and regards

Reply

19. rameez says:

October 17, 2013 at 7:13 am

Dear All, I require help.

I currently have P6 V7 standalone version installed in my

computer. I want to install SDK for some urgent work.

I am able to install it using the modify option. However

when I am trying to configure the database the it says ” Bad

Public User name or password. Database Server Error

I have reinstalled Primavera many times but still this error

persists.

Can anybody help?

Reply
o PlannerTuts says:

October 18, 2013 at 9:01 am

have your tried

username pubuser with the same password?

Reply

20. BRUNO SENA says:

October 17, 2013 at 8:08 am

Dear RAMEEZ,

Greetings from Brazil !!!

You must use the same password when you install P6.

However, try something like that :

User Name : pubprm$pm

Password : same word when you install P6

See other posts between me and the masters Michael

Lapage and Mimoune Djouallah. May help you …


I hope it works …

Best Regards,

Bruno.

Reply

21. rameez says:

October 17, 2013 at 3:52 pm

DEAR Bruno,

I have tried this password as well but in vain.

Please help me out , as i am in a great fix

Reply

22. Mehdi says:

September 03, 2014 at 8:21 am


hi ;

my WBS ID Length doesn’t change greater than 20 but i can

decrease this amount , why this happen occur?

Reply

o PlannerTuts says:

September 05, 2014 at 9:19 am

Hi Mehdi,

There are some admin settings that control ID lengths.

Admin menu -> Admin Preferences -> ID Length tab –

perhaps you’ve already seen it. Yes the max is 20

characters for WBS Code. I do not know why. But since

WBS is a hierarchy, the WBS Codes for each level are

displayed with dots between. Project Name.WBS Level

1.WBS Level 2.WBS Level 3…. Perhaps if you add them

all up, 20 characters for each level is all it can handle.

Michael

Reply
23. Mehdi says:

September 15, 2014 at 12:44 am

Thanks Michael for your reply , I got it.

Reply

24. Sandesh Negi says:

January 22, 2015 at 12:11 pm

Please watch the video in the link provided & you will come

to know how much easier is to load the WBS from excel to

primavera without any SDK or parser builder.

https://www.youtube.com/watch?v=i0vHL_znjIY

If you like the video please mark the comment, it will be

admirable.

Reply

o Dustin says:
February 25, 2015 at 3:47 pm

This was going to be my next area to look into. Thanks

for the quick tutorial on what data needs to be altered

in the .XER text in order to get the desired result. Well

done.

Reply

25. Dustin says:

February 25, 2015 at 3:40 pm

It seems that in version 8.4 the “Set” functionality has take a

step back. I can query the data and alter the WBS name,

however I cannot establish a WBS hierarchy or even create

new elements. Are there any updated excel sheets which

correspond to the SQL table structure in the newer releases

i.e.8.3 and later?

Reply

26. Arkan says:
August 15, 2016 at 1:00 am

hi I’m from Ethiopia, I’m one of the user to primavera P6

R8.4 in window 10 pc and now I’m very interested in

primavera SDK software,

this helpful for my work .

Please any one can help me how to install this amazing

software.

Thanks in advance,

Reply

27. Padmanabhan says:

June 13, 2017 at 9:17 pm

while importing from excel WBS code in not fully copied.

means only the parent code is copied. Hence group and sort

in not possible. Appreciate your help.

Reply

28. eldhoe says:
March 25, 2021 at 7:36 am

p6 8.3 version can run with oracle

Reply

Leave a Reply

Your email address will not be published. Required fields are

marked *

Comment

Name *

Email *

Website

Post Comment

This site uses Akismet to reduce spam. Learn how your comment

data is processed.
   

POPULAR ARTICLES

 Primavera P6 Version 20.12 Is Out. Here’s What’s New.

 Critical Path vs Longest Path

 Graphing a P6 Resource S-Curve in Excel

 How To Help Your Project Controls Team Love Online Learning


 11 Killer Interview Questions For Hiring A Project Controller

 7 Earned Value Management Formulas To Make Your Life Easier As

A Project Controls Professional

 How to Audit Your Primavera P6 Global Activity Codes

 Boring Project Reports? 8 Project Timeline Tools To Help You Create

Visual Reports

Browse All Article Topics

Search

COMPANY

 About Plan Academy

 Customer Case Studies

 Careers

TRAINING & SUPPORT

 Courses
 Training for Teams

 Support Services

 Free Webinars

 Free Resources

 Blog

 Help Center

LEGAL STUFF

 Terms of Use

 Membership Terms

 Privacy

CONNECT

Contact Us

Customer Support

Plan Academy Inc.

Hamilton, ON Canada.

1-877-626-2690

Follow Us:
Copyright © 2021 Plan Academy Inc. · All Rights Reserved ·
{"mode":"full","isActive":false}

You might also like