Premium support for our pure JavaScript UI components


Post by rahulranjan »

Hi
Can we Import/EXPORT MPP file using Angular as Front End and Nodejs in Backend


Post by pmiklashevich »

Hello,

Export to MPP file is not supported. We have MspExport feature which exports to XML which is understood and can be easily imported by MS Project. No server required for the export. You can find an example in Gantt/examples/msprojectexport

To import from MPP file Java is required. Please read Gantt/examples/msprojectimport/README.md for details. In our Gantt/examples/msprojectimport example we use PHP as a server side, but it just processes requests and runs a java-command to generate the data.

    // launch JAR file to extract the uploaded MPP-file contents
    $shell_command = 'java -jar '. escapeshellarg($jar_path) .' '. escapeshellarg($move_path) .' 1';

Feel free to implement your server in node.js.

You can use any client-side framework you want for both import and export.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by rahulranjan »

Hi
Thanks

const { files } = filesData;
      const formData = new FormData();
      formData.append('mpp-file', files[0]);
      this.gantt.maskBody('Importing project ...');
      AjaxHelper.post('https://localhost:8028/mppServer/php/load.php', formData, { parseJson: true }).then(
        async ({ parsedJson }) => {
          if (parsedJson.success && parsedJson.data) {
            console.log(parsedJson.data);
            // const { project } = gantt;
          }
        }
      );

I trying to do it and Same php code i running in Apache Server . But it does not return anything


Post by pmiklashevich »

Does Gantt/examples/msprojectimport demo work for you? Please note, server-side issues cannot be managed by the forum support. You need to debug your backend and make it to return the data.

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply