Import from MS Project
PRO
The functionality is available in PRO Edition only
You can import MS Project XML data to Gantt, provided that you handle file upload and read file contents as text. Then you can send the resulting XML string to the import-data action | PRO feature that parses it to Gantt tasks and links:
<script>
import { Gantt } from "@svar/svelte-gantt";
let api = $state();
function importMSProject() {
// your uploader control
const file = document.getElementById("import-file").files[0];
const reader = new FileReader();
reader.onload = e => {
const xml = e.target.result;
api.exec("import-data", {
data: xml,
});
};
reader.readAsText(file);
}
</script>
<Gantt bind:this={api}/>
Related sample: Export/import to MS project (client-side)
Related articles: