Chennai HQ · serving India, UAE, Saudi Arabia and Omaninfo@projectassure.inCall us 24/7 +91 94895 88922
Project Assure
Schedule Quality

How to read a Primavera P6 XER file without a P6 licence

An XER file is a P6 schedule exported as plain-text tables. Here is how the format works, which tables and fields matter, and what to check first.

In short

An XER file is Primavera P6's plain-text, tab-delimited export: each table starts with a %T line, its field names follow on a %F line and each row of data is a %R line. You can read it without P6 in a text editor, a spreadsheet (imported as tab-delimited text) or a short script. Start with the PROJECT table's last_recalc_date (the data date), then the TASK and TASKPRED tables for activities, logic and constraints, remembering that durations, lags and float are stored in hours.

An XER file is the plain-text, tab-delimited export format of Primavera P6, and it holds a schedule as a set of database tables. You can read one without P6: each table starts with a %T line, followed by a %F line of field names and one %R line per row of data, so a text editor, a spreadsheet or a short script will open it.

Reading it well takes a little more. The tables are linked by internal IDs, durations and float are stored in hours, and codes such as TK_Active or PR_FS need decoding. This guide sets out the file structure, the tables that matter most (PROJECT, TASK and TASKPRED) and what to check first.

What is an XER file?

XER is the native exchange format of Primavera P6, used to move projects between P6 databases. One file can contain one or more projects with their WBS, activities, relationships, calendars, resources and assignments, activity codes and user-defined fields. It is not a document but a dump of database rows.

On construction projects it is usually the file a contractor submits alongside a PDF of the programme. Reviewers ask for it because the PDF shows bars and dates, while the XER shows the logic, constraints, calendars and float that produce them.

What is the XER file format?

The file is line based, with fields separated by tabs. Each line starts with a marker that tells you what it is:

MarkerMeaningExample
ERMHDRHeader line at the top of the fileP6 version, export date and other export details
%TStart of a table%T TASK
%FField names for that table, in column ordertask_id, proj_id, wbs_id, clndr_id, task_code, task_name ...
%ROne data row, values in the same order as the %F lineOne activity, one relationship or one calendar
%EEnd of file

So a TASKPRED table is a %T TASKPRED line, a %F line listing fields such as task_pred_id, task_id, pred_task_id, proj_id, pred_proj_id, pred_type and lag_hr_cnt, then one %R line for each relationship. Every table in the file follows the same pattern, one after another.

Three details catch people out:

  • Hours, not days: durations, lags and float are stored in hours (fields ending in hr_cnt). Convert them using the hours per day of the activity's calendar: an 80-hour activity on an 8-hour-day calendar is 10 days.
  • Internal IDs: tables link through internal numeric IDs (task_id, wbs_id, clndr_id), not the Activity ID you see in P6. The Activity ID is task_code.
  • Encoding: XER files are often written in a Windows code page rather than UTF-8, so accented characters in activity names can look garbled if the file is opened with the wrong encoding.

Which XER tables matter most?

TableWhat it holdsKey fields
PROJECTOne row per project in the fileproj_id, proj_short_name, last_recalc_date (data date), plan_start_date, scd_end_date (scheduled finish), plan_end_date (must finish by date)
PROJWBSWBS nodeswbs_id, parent_wbs_id, wbs_short_name, wbs_name
TASKActivitiestask_id, task_code, task_name, task_type, status_code, durations, dates, float, constraints, clndr_id
TASKPREDRelationshipstask_id (successor), pred_task_id (predecessor), pred_type, lag_hr_cnt
CALENDARCalendarsclndr_id, clndr_name, day_hr_cnt, clndr_data (work week and exceptions)
RSRC and TASKRSRCResources and their assignments to activitiesrsrc_id, task_id, target_qty, act_reg_qty, remain_qty
ACTVTYPE, ACTVCODE, TASKACTVActivity code types, code values and their assignment to activitiesactv_code_type_id, actv_code_id, task_id
UDFTYPE and UDFVALUEUser-defined fields and their valuesudf_type_id, fk_id, udf_text, udf_number, udf_date

What do the main TASK fields mean?

  • task_id and task_code: task_id is the internal key other tables link to. task_code is the Activity ID.
  • task_type: TT_Task (task dependent), TT_Rsrc (resource dependent), TT_LOE (level of effort), TT_Mile (start milestone), TT_FinMile (finish milestone) and TT_WBS (WBS summary).
  • status_code: TK_NotStart, TK_Active or TK_Complete.
  • target_drtn_hr_cnt and remain_drtn_hr_cnt: original duration and remaining duration, in hours.
  • Dates: act_start_date and act_end_date (actuals), early_start_date and early_end_date, late_start_date and late_end_date, and target_start_date and target_end_date (planned dates).
  • total_float_hr_cnt and free_float_hr_cnt: total and free float, in hours. Do not confuse these with float_path, which only holds the path number when multiple float paths were calculated.
  • cstr_type and cstr_date: the primary constraint and its date, with cstr_type2 and cstr_date2 for a secondary constraint. Values include CS_MSO (Start On), CS_MSOA (Start On or After), CS_MSOB (Start On or Before), CS_MEO (Finish On), CS_MEOA (Finish On or After), CS_MEOB (Finish On or Before), CS_MANDSTART and CS_MANDFIN (mandatory start and finish) and CS_ALAP (As Late As Possible).
  • clndr_id: the calendar the activity is scheduled on, which you need to convert its hours into days.

How do relationships work in the TASKPRED table?

Each TASKPRED row is one link. task_id is the successor and pred_task_id the predecessor, both as internal IDs, so join them to the TASK table to see Activity IDs and names. pred_type is PR_FS, PR_SS, PR_FF or PR_SF (Finish-to-Start, Start-to-Start, Finish-to-Finish, Start-to-Finish). lag_hr_cnt is the lag in hours, and a negative value is a lead.

Where proj_id and pred_proj_id differ, the link is to an activity in another project. That project may not be in the file, so the external link will appear to point at nothing.

How can you open an XER file without P6?

1. A text editor

Any text editor opens an XER. It is the quickest way to check the header (P6 version and export date), see which tables are present and search for last_recalc_date. It is impractical for reading the schedule itself, and very large files can be slow to open.

2. A spreadsheet

Import the file as tab-delimited text. Renaming it to .csv does not work reliably because CSV expects commas. Every table then arrives stacked in one sheet, each with its own field-name row, so split it at the %T lines into one sheet per table. Relationships only make sense once TASKPRED is joined to TASK on task_id. This is workable for a small file and error-prone for a large one.

3. A short script

A few lines of Python or a similar language can split the file at each %T line, use the %F line as column headings and produce one table per XER table. It is repeatable, which makes it the best option when you need to compare two updates of the same programme.

4. An XER viewer or schedule-checking tool

Several third-party products read XER files and show a Gantt chart, the logic and standard checks. Before using one, find out whether it processes the file on your computer or uploads it to a server, and check that your contract's confidentiality terms allow it.

5. Import into P6

Importing into P6 is the only way to see the schedule as the issuer saw it, and it requires a P6 licence. Import into a separate EPS node or test database so nothing is overwritten. Layouts and filters are not normally carried in the XER, so ask the issuer for PDFs of the agreed layouts as well.

What should you look at first when reading an XER?

  1. Header: P6 version and export date. The export date tells you how recent the file is.
  2. PROJECT table: how many projects the file contains, the data date (last_recalc_date) and the scheduled finish (scd_end_date). Check the data date against the cut-off stated in the update narrative. Our guide to the data date in Primavera P6 explains why this comes first.
  3. Activity count and status: count activities by status_code. Look for activities marked complete without an actual finish, and for actual dates after the data date (invalid dates, where the DCMA target is zero).
  4. Logic: find activities with no predecessor or no successor in TASKPRED. DCMA expects fewer than 5% open ends, and a well-built programme normally has only one start and one finish milestone without them. Check the relationship mix (at least 90% Finish-to-Start), leads (zero) and lags (fewer than 5% of relationships).
  5. Constraints: list every activity with cstr_type populated. Hard constraints (Start On, Finish On, Start On or Before, Finish On or Before and the mandatory constraints) should be fewer than 5% of activities, because they override logic.
  6. Float and duration: convert total_float_hr_cnt and remain_drtn_hr_cnt to days. DCMA targets no negative float, and fewer than 5% of activities with total float or remaining duration over 44 working days.
  7. Calendars: check which calendars are used and their hours per day, so every conversion from hours to days is right.

What are the common pitfalls when reading an XER?

  • Reading hours as days: a remaining duration of 400 looks alarming until you divide by the calendar's hours per day.
  • Joining on Activity ID: join on task_id. Activity IDs can repeat across projects in a multi-project file.
  • Missing relationships: activities without predecessors or successors break the critical path and make float meaningless.
  • A stale data date: a data date well before the export date suggests the file was not progressed to the current period, or that an old copy was sent.
  • Stored values that are out of date: dates and float in the XER are as last calculated. If activities were edited after the last reschedule, those values no longer match the logic.
  • Misreading negative float: negative float means forecast dates are later than a constraint or the project must finish by date. It shows a forecast missing a target date, so check which date is driving it before concluding the project is late.
  • Excessive constraints: large numbers of Finish On or Before or mandatory constraints can force dates that the logic does not support.

For a submitted programme, the XER is the evidence and the PDF is a picture of it. Reading contractor XER files against these checks is part of how Project Assure reviews programmes in its project planning work, before the schedule is accepted as a baseline or used to support a claim.

FAQ

Common questions

Can I open an XER file in Excel?
Yes. Import it as tab-delimited text rather than renaming it to .csv. All the tables arrive stacked in one sheet, so split them at the %T lines and join TASKPRED to TASK on task_id to read the relationships.
How do I find the data date in an XER file?
The data date is the last_recalc_date field in the PROJECT table. In a text editor, search for %T PROJECT and read the value in the last_recalc_date column.
What are the most important fields in the TASK table?
task_code (Activity ID), task_name, task_type, status_code, target_drtn_hr_cnt and remain_drtn_hr_cnt (original and remaining duration in hours), the actual, early and late dates, total_float_hr_cnt, and cstr_type with cstr_date for constraints. task_id is the internal key that other tables link to.
Is it safe to open an XER file in an online tool?
It depends on whether the tool processes the file on your computer or uploads it to a server. Check how the tool handles files and whether your contract's confidentiality terms allow schedule data to be shared before using one.
Can I convert an XER file to PDF?
Not directly. Import it into P6 and print or export a layout to PDF, or extract the tables into a spreadsheet and print from there. On a contract, it is simpler to ask the issuer for PDFs of the agreed layouts alongside the XER.
Chennai city skyline at dusk under a vivid pink and violet sky

Bring this discipline onto your programme.

Every insight comes from live mandates. A principal replies within one working day.