Hi, I’ve done my best to search for an answer so apologies if this has been covered elsewhere.
The app has some text inputs, location data, and Bluetooth LE data.
When all fields are completed, i’d like the user to be able to generate a csv file that is saved on their phone that records the data that was entered. The data doesn’t need to persist between sessions in the app. Is this possible and if so what’s the best way to go about it?
I’m interested in the same thing. Has anyone used the above https://json-csv.com/api successfully? Or figured how to create a shareable CSV? Any chance you’d share your blocks?
I looked through the info for that API and a few others like it and I didn’t find anything that will return a CSV file that looks useable with Thunkable. They are almost all online generators that don’t have APIs associated. And the ones with APIs don’t seem to return files.
Hello, just want to ask, did you found a solution to export data?
Im looking aswell for a way to export data from a local database, I would create a json but i just still don’t know how to send it out of the app. Paid APIs are not an option for me.
Did you ever figure out a solution to this. I am looking at this 8 months later and still see no viable solution. I have an app that the user stores load information and would like the ability for them to email the loads to their superiors. If not the only way i can see this working is to use firebase and then return some json and maybe with blocks code create some sort of email response.
I haven’t figured out a clever way of saving files to the phone’s file system using Thunkable but I did manage to configure it to send the comma separated values in the form of the body of an email.
At some point I want to try replicating this in Thunkable using the open-ended functions or by simply editing the exported APK in android studio and adding this:
AHEM, MAYBE THUNKABLE FOLK ADD A MODULE FOR US INSTEAD… HINT HINT.
String baseDir = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
String fileName = "AnalysisData.csv";
String filePath = baseDir + File.separator + fileName;
File f = new File(filePath);
CSVWriter writer;
// File exist
if(f.exists()&&!f.isDirectory())
{
mFileWriter = new FileWriter(filePath, true);
writer = new CSVWriter(mFileWriter);
}
else
{
writer = new CSVWriter(new FileWriter(filePath));
}
String[] data = {"Ship Name", "Scientist Name", "...", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").formatter.format(date)});
writer.writeNext(data);
writer.close();
I tried the blocks above…works but, not so well with 7 or 8 columns. CSV is exported like the image but does not convert to excel very well. what we need is the ability to do this.
. This is from https://onlinecsvtools.com/ they might have an api
Initially, that is where I was headed. But, found out that any Google sheet has a 100 user limit. That doesn’t allow for scalability. The app will have users…more than 100 hopefully the firebase route is the obvious route, but I am not to versed in converting Json to a readable format. The users record load info. At anytime they need the ability to send one or more of these records to someone higher up…preferably in a readable format.