I saw the import function on the official website
https://bryntum.com/examples/gantt/msprojectimport/
But I wanted to add import functionality to Angular, so I didn't know how to use it.
Support Forum
Hi shimnx,
We don't have msprojectimport
demo in Angular currently. I don't see any framework related code in there. What problems do you have during your implementation? We could help you with issues, just post your app here.
If you need an assistance in development, please contact our sales for Professional Services, we will be glad to help you. https://www.bryntum.com/services
All the best,
Alex
async importMPP(){
if ((this.gantt.widgetMap as any).input.files) {
const { project } = this.gantt;
// Import the uploaded mpp-file data (will make a new project and assign it to the gantt)
// await this.importData(parsedJson.data);
// // destroy old project
// (project as any).destroy();
// // set the view start date to the loaded project start
// this.gantt.setStartDate((this.gantt.project as any).startDate);
// await this.gantt.scrollToDate((this.gantt.project as any).startDate, { block : 'start' });
// (this.gantt.widgetMap as any).input.clear();
// // remove "Importing project ..." mask
// this.gantt.unmaskBody();
}
}
Assuming I have the right data (parsedJson) I want to import on the front end, how should I import it next? Also, can you provide us with imported back-end services?
Thank you!
- Attachments
-
- advanced examples 3.zip
- (154.29 KiB) Downloaded 41 times
https://bryntum.com/examples/gantt/msprojectimport/
When I used the official example to import an MPP file, because some of our information had Chinese characters, the Chinese characters appeared garbled after the import
Assuming I have the right data (parsedJson) I want to import on the front end, how should I import it next?
Sorry, not sure I've got your problem. We have Importer.js
file in example you mentioned. There is a code that shows exactly that you are asking.
You need to create a project, load data into project and set that project to your gantt instance. Please check importData
method. Second part of implementation is shown in importMPP
method that you commented. Make sure you passed instances of gantt and project model correct.
Also, can you provide us with imported back-end services?
I am afraid it cannot be implemented in bounds of forum support. I've opened a feature request to implement this demo
https://github.com/bryntum/support/issues/4860
When I used the official example to import an MPP file, because some of our information had Chinese characters, the Chinese characters appeared garbled after the import
Does it garbled in the Gantt or you see it garbled already in your JSON file? Usually it's a problem of encoding. Please check your settings.
All the best,
Alex
Idea of the import demo is following: upload MSP file to the backend, run java app to read MPP file and convert it to the required JSON format, send it to client. Then client should process the data and create a project definition. There is nothing specific to the angular framework, just plain JS.
Speaking of Chinese character support, we haven't tested that. Could you send us a sample file so we could check at which stage problem occurs?