How to use CSV Files Follow
Can you please kindly explain how to add CSV file to the MPS and how to get data from it?
For an example, I need to get data from a CSV file and calculate average, max, min and display the results in a form. I already design the form. Problem is how to add CSV file and access data from it
Your support is highly appreciated.
Regards
Pradeep
Please sign in to leave a comment.
Hi,
A (probably suboptimal) solution is to use TextFile, see j.m.build.startup, it's a plain text file abstraction.
Mar
Thank you very much and highly appreciated.
I am new to MPS. Could you please explain hoe to locate/find the
j.m.build.startup
Is it a sample project?
Regards
Pradeep
In one of my behavior model of one of my languages I have a text file, to create it:
Now if you right click on the behavior model, into the "New" menu you should be able to select first "j.m.build.startup" then "TextFile".
Hope this will help.
Mar
Many thanks Mar,
I will try and if any questions, I will come back to you.
Highly appreciated for your kind help
Kind regards
Pradeep
You could have a look at this project: https://github.com/CampagneLaboratory/XChart
We don't expose the data in TSV/CSV, but represent the file and its columns inside MPS, the data stays in the file and can be accessed using regular Java mechanisms (useful when the TSV files are large).
Thank you very much Fabien.
I will have a look and let you know.
Highly appreciated.
Kind regards
Pradeep