How do I append Listbox text to an existing CSV?

So I have a CSV that looks like this:

First Name Last Name First Location Last Location Travel Day Travel Type Cluster 1 Cluster 2
Foo Bar double double text text
text text double double text text
text text double double text text
text text double double text text
text text double double text text

I want to add data from a ListBox into Cluster 1 or Cluster 2 but when I do this – all the ListBox data starts at the end of the current data like so:

First Name Last Name First Location Last Location Travel Day Travel Type Cluster 1 Cluster 2
Foo Bar double double text text
text text double double text text
text text double double text text
text text double double text text
1 5
3 3
2 1
4 2
1 3

Instead I want to push a button and edit the current data so it looks like this:

First Name Last Name First Location Last Location Travel Day Travel Type Cluster 1 Cluster 2
Foo Bar double double text text 1 5
text text double double text text 3 3
text text double double text text 2 1
text text double double text text 4 2
text text double double text text 1 3

This is what I have for my code.

Any help would be appreciated!

submitted by /u/DeliciousToastie
[link] [comments]

Leave a Reply