I'm using Intel Edison as a server that collects data and then saves the data to a file in SD card. I'm using Node.js. I know that it is possible to save as TXT file.
But is it possible to save the data as CSV format file? Please show me how if it is possible.
Thanks and best regards.
Thanks for your interest in the Intel® Edison Platform.
I have not saved data as a CSV format file before, however, I have been investigating how it could be done and I'd suggest you to try to use nodeCSV, it provides CSV generation, parsing, transformation and serialization for Node.js. Please take a look at https://github.com/wdavidw/node-csv# readme NodeCSV for more details.
Hope you find this information useful.
Hi Yermi A.,
Thanks alot about your help.
I've read what you gave me. It's so complicated for me, so I decided to use JSON instead. But please tell me how can I tell the Edison to save the JSON file on sdcard?
Your welcome, we are here to help you. Regarding your question, you can write your own code to store the JSON file using the file system (fs) module and specifying the path of the SD card that is usually mounted in /media/sdcard. Please take a look at the "Write file" section here: http://en.proft.me/2016/03/20/how-read-and-write-file-nodejs/ How to read and write a file in Node.js.
Additionally, you can also take a look at these link for extra information:
Hope this information helps.