konvertiert eine MS Project Datei im XML- oder MPP-Format in JSON
config | object | ein Objekt mit Konfigurationseinstellungen für die importierte Datei |
gantt.importFromMSProject({
data: file,
taskProperties: ["Notes", "Name"],
callback: function (project) {
if (project) {
gantt.clearAll();
if (project.config.duration_unit) {
gantt.config.duration_unit = project.config.duration_unit;
}
gantt.parse(project.data);
}
}
});
Diese Methode benötigt Unterstützung für die HTML5 File API.
Diese Methode ist Teil der export-Erweiterung, daher stellen Sie sicher, dass das Plugin export_api aktiviert ist. Weitere Details finden Sie im Artikel Export und Import aus MS Project.
Für Gantt-Versionen vor 8.0 binden Sie das Skript https://export.dhtmlx.com/gantt/api.js auf Ihrer Seite ein, um den Online-Export-Service zu aktivieren, zum Beispiel:
<script src="codebase/dhtmlxgantt.js"></script>
<script src="https://export.dhtmlx.com/gantt/api.js"></script>
Die Methode akzeptiert ein Objekt mit Konfigurationsoptionen für die importierte Datei:
Die Antwort liefert ein JSON-Objekt mit folgender Struktur:
{
data: {},
config: {},
resources: [],
worktime: {}
}