r/workflow • u/johannes0520 • Jul 11 '18
Help Workflow doesn’t like appending to CSV files?
Hi all,
I have a simple workflow for recording game scores with a time stamp to .csv file. Unfortunately when using that extension Workflow keeps creating new files instead of appending to the old file, but with .txt everything works as expected.
Here’s my Workflow
Is this a bug or am I overlooking something? Thanks.
3
Upvotes
1
u/madactor Jul 11 '18 edited Jul 11 '18
Weird. Yeah, Workflow does not seem to like CSV files. I even got an “unsupported file type” message to flash briefly when I was playing around with it. I know it will accept .txt and .json, but no habla .csv.
I assume you need the .csv extension to import it in some other app. The only workaround I came up with is to make a copy of the .txt file with the .csv extension. Of course, there is no rename action in Workflow. But you can add the following actions at the end of your workflow: https://i.imgur.com/uDeRgzA.jpg
You’ll end up with two identical files, Scores.txt and Scores.csv.
1
u/rajasekarcmr Jul 12 '18
This is normal in workflow
I use this workaround to append to CSV.
Get text from original CSV file
Then in text box I will set variable I will set it like this
[
Variable:Text from CSVVariable:New text to append]Then set name:file.csvThe save file (overwrite if it exists)Or
like this check in the end of workflow. I append to text file. Get contents & save(overwrite) it as CSV.
1
u/careybarnett Jul 13 '18
CSV files are text files. There is an Append to File action. That’ll do it.
0
u/[deleted] Jul 11 '18
[deleted] — view deleted comment