Basically I have a string variable that is composed of two other variables separated by a comma:
item = "Pencil";
amount = 5;
entry = item + "," + amount;
*export entry to csv
So the "entry" variable should be in the correct format to save as a comma separated file. Is there some command that will take this variable and save it as a csv, or any other format easily opened in a spreadsheet for later use? The entry variable will change and the new information will need to be appended to the csv file if it already exists. So let's say if we also had:
item = "Paper";
amount = 25;
entry = item + "," + amount;
*export entry to csv
The resulting csv file should be:
Pencil,5
Paper,25
I've done a bit of searching through other questions, but most folks seem to be trying to do more complex things (e.g., dealing with server vs. client-side issues) while I'm just trying to figure out how to get data I'm working on my own computer in javascript to a saveable file. Seems like that isn't the case for many questions being asked though. I'm sure there's a simple answer out there and hopefully just a single command or two. However, I've been wading through a lot of semi-related posts that aren't too clear, so I figured this would be quicker.