writing in a specific row/deleting a row

31 views
Skip to first unread message

Reuben Cabrera

unread,
Jun 6, 2016, 11:42:15 PM6/6/16
to CSVChat
is there a way to delete a row, I have read a post in this group regarding how to delete or perhaps update a file however i do not understand how it works. it seems that write always enters a new record on a new line.

shriop

unread,
Jun 6, 2016, 11:46:40 PM6/6/16
to CSVChat
CSV is a simple structured file lacking more complex features like deleting single rows. To delete a row, you have to instead read in every row from the file, writing each row back out to a new file, except the one that you're wanting to effectively delete. When you're done, you can delete the original file and rename the new file to the name of the original file.

Bruce Dunwiddie

Reuben Cabrera

unread,
Jun 6, 2016, 11:52:08 PM6/6/16
to CSVChat
writing to a new file and renaming the file. is this done manually?

shriop

unread,
Jun 7, 2016, 9:36:13 AM6/7/16
to CSVChat
Programmers would normally write code to do this, but they would have to write out a few lines of code.

Bruce Dunwiddie
Reply all
Reply to author
Forward
0 new messages