
Resolve resource overallocation
Two valid task dates can still produce an impossible resource plan. Make the conflict visible, calculate a proposed schedule, and inspect what moved.
The optional Microsoft Project adapter for RevoGrid Gantt imports Project XML and native MPP14 files. It exports Project XML. Review the conversion warnings before applying an import, especially if the schedule relies on custom calendars or resource assignments.
In the React example, you can preview the sample XML, apply it, edit a task, and export a fresh XML file from the updated schedule. Native MPP export is unsupported.
The hosted Microsoft Project demo runs conversion locally in the browser. Use its sample XML to inspect an import, edit the schedule, and export XML without setting up a backend.
The React example includes the import preview and the Apply and Cancel controls.
The converter is separate from the public Gantt trial package. The companion's setup instructions use the optional adapter built from that release's licensed source; they do not assume a public trial package exists for it. Configure access according to the Gantt installation guide.
| Input or output | Current support | Application response |
|---|---|---|
| Microsoft Project XML | Import and export | Review the mapped fields and warnings |
| MPP14 | Import only | Review additional native-import losses |
| MPP8, MPP9, MPP12 | Unsupported | Show unsupported-mpp-version; ask for Project XML |
| Encrypted MPP | Unsupported | Show encrypted-mpp-not-supported |
Native .mpp export | Unsupported | Offer XML export |
The file importer inspects the compound-document signature for native MPP rather than relying only on .mpp in the filename. A browser File supplies both text() and arrayBuffer(). A custom file-like object needs binary access for MPP; XML-only adapters can supply name and text().
An invalid native file produces invalid-mpp; invalid XML and an XML project without importable tasks have their own errors. Catch these errors and leave the current project intact. Do not silently interpret an unsupported file as an empty replacement project.
The Microsoft Project format reference documents this support matrix.
Use the framework-neutral converter for a review step:
import { importMicrosoftProjectFile } from '@revolist/revogrid-gantt-msp';
const result = await importMicrosoftProjectFile(file, {
projectId: 'machine-rollout',
currency: 'EUR',
timeZone: 'UTC',
});
// Store this in application preview state. Do not replace grid.source yet.
setPreview(result);The result contains a ProjectSnapshot and structured warnings. Display the warnings beside task/dependency counts and an explicit Apply/Cancel choice. The complete React component also handles rejected files and prevents an older asynchronous parse from replacing a newer preview.
GanttMspImportPlugin.importFile() is useful when immediate application is wanted: it converts the file and applies the project. It is not a preview-only method. For the workflow in this article, the standalone converter gives the application control over when replacement happens.
On Apply, the companion passes the imported tasks through the React grid wrapper. It maps progressPercent to the task-row percentDone field and supplies ganttDependencies, ganttCalendars, ganttResources, ganttAssignments, and ganttBaselines. The project is mounted with a new React key when a replacement is accepted; ordinary renders retain its state.
See the complete ImportProject.tsx, including both review panels. The application owns the replacement decision, file retention, server authorization, and persistence. The converter owns format parsing and the supported mappings.
The companion includes a small authored XML fixture. Its expected import result is:
| Check | Expected result |
|---|---|
| Tasks | Four: rollout summary, Commission machine, Write handover notes, Ready milestone |
| Dependencies | Two finish-to-start links |
| Calendars | One generated Monday–Friday calendar |
| Baselines | The first baseline for the handover task |
| Commission duration | 16 canonical hours |
| Commission progress | 50% |
| Import warning | default-calendar-created |
First preview the sample and cancel: no active project should be replaced. Preview it again and apply. Change Commission machine to Commission line A, then prepare and download XML. The exported task name should contain the edit. Reimport that XML to compare the supported fields.
This fixture demonstrates XML conversion. It is not evidence that every Microsoft Project MPP14 producer, every custom field, or a complex production schedule will round-trip correctly. Use representative customer files before making a migration commitment.
The current adapter has a narrower scope than the complete Microsoft Project model:
| Data | XML import | Native MPP14 import |
|---|---|---|
| Task names, hierarchy, dates and durations | Mapped | Mapped |
| Summary tasks and milestones | Mapped | Mapped |
| FS, SS, FF and SF dependency relationships | Mapped | Mapped |
| Dependency lead/lag | Not retained; lag becomes zero | Not retained; lag becomes zero |
| Completion progress | Mapped | Defaults to zero |
| Notes | Mapped | Omitted |
| First task baseline | Mapped when exposed by the XML converter | First-baseline dates mapped |
| Additional baselines | Not retained | Omitted |
| Microsoft Project working calendars | Replaced by a standard calendar | Replaced by a standard calendar |
| Resources and assignments | Not imported by this adapter | Omitted |
XML is therefore not a lossless workaround for resource or calendar preservation. Native MPP returns unsupported-fields for its intentional omissions, while XML warns that a default calendar was created. The warning array is not a complete field-by-field compatibility report. Consult the mapping table even when there are few warnings.
The adapter works with a date-based schedule mapping. Do not promise preservation of every original intraday timestamp, custom field, constraint, cost, scheduling option, or Microsoft Project calculation merely because tasks appear in the grid. Review the scheduling compatibility guide separately from file-format support.
A synthetic Monday–Friday calendar may give different effective dates from a source project with holidays, night shifts, or separate resource calendars. The companion enables excludeHolidaysFromDuration: true, so the active calendar participates in scheduling after Apply.
For a real migration, collect the original calendar definitions separately, recreate them, assign their IDs to tasks/resources, and compare the recalculated schedule. Import or reconcile resources and assignments through application data rather than assuming they arrived from the Project file. Compare milestones, task durations, progress, dependency relationships, and the final project finish against the source.
The working-calendar tutorial shows inherited weeks and exceptions. Resource leveling becomes meaningful only after the actual resources, capacities, and assignments are present.
Keep the imported snapshot separate from the current runtime state. Exporting the original result.project after a user edits the grid would produce stale dates or names.
The companion finds the current GanttPlugin and gets its project collections. It uses a temporary captureBaseline() result to overlay effective scheduled dates, durations, and progress on those collections. This capture does not add a persisted baseline; it supplies canonical-hour values after scheduling and summary rollup.
import { GanttPlugin, type ProjectSnapshot } from '@revolist/gantt';
export async function currentSchedule(
grid: HTMLRevoGridElement,
): Promise<ProjectSnapshot> {
const runtime = (await grid.getPlugins()).find(
(plugin) => plugin instanceof GanttPlugin,
);
const project = runtime?.getProjectSnapshot();
if (!runtime || !project) throw new Error('The project is not ready.');
// Capture is pure: it does not append a saved baseline to the project.
// It gives us effective dates and canonical-hour durations after scheduling.
const capture = runtime.captureBaseline();
const scheduled = new Map(capture?.tasks.map((task) => [task.taskId, task]));
return {
...project,
tasks: project.tasks.map((task) => {
const current = scheduled.get(task.id);
return current
? {
...task,
startDate: current.startDate,
endDate: current.endDate,
duration: current.duration,
progressPercent: current.progressPercent,
}
: task;
}),
};
}Then convert that current snapshot:
import { exportMicrosoftProjectXml } from '@revolist/revogrid-gantt-msp';
const current = await currentSchedule(grid);
const exported = exportMicrosoftProjectXml(current);
// Present exported.warnings before offering exported.xml for download.
setExported(exported);XML export remaps task IDs to numeric Project UIDs when necessary. It does not export resources, assignments, non-default calendars, or dependency lag; only the first baseline is considered. The resulting XML should be validated in the target application before it becomes a contractual schedule or the sole backup of a project.
Use the complete JSON project snapshot for your application's own persistence. XML is an interchange format with an explicit mapping boundary. Server saves still need authorization, revision checks, and recovery for failed requests; local conversion does not implement those behaviors.
The format reference and live demo, React Gantt integration, and Gantt product page provide the next steps for trying the workflow with your data.