So you want to put a .csv file on the device.
Okay, 2 steps: 1) Build the file as a “string” in memory first, then 2) write the stuff you have onto the device.
Step 2 is pretty standard, look at https://ionicframework.com/docs/native/file/
For step 1 you have to understand what you actually want to build. What data should be in there? How should it be seperated?
Then you have to find a way to transform the array of data you have into that format. One “naive” way is to loop over the data with for … loop and add to a string at the end. When the string is in the correct format, go on with step 2. (The other non-naive way is to find a library to build a CSV from an array automatically. They probably exist, but you will have to find the right one that works.).