Im starting to design a program that will automate the process of finding and identifying strings correctly based on similar strings and their identities that have been found and saved into a master CSV/Excel file.
Right now I want to design it properly so I dont run into issues later when implementing the CSV/Excel read writing part.
I will probably use OpenCSV to write and read the files, so my question is more about how I can edit the file.
Last time I dealt with editing CSV files I had to rewrite each line to a new or existing file rather than just editing a specific line. Is this the only way to do this?
Ex - if my csv is something like
1,2,3 and i wanted to change 1,2,3
4,5,6 4,5,6 to a,b,c a,b,c
7,8,9 7,8,9
The only way would be to read each line, change it if needed, then write it out again? There's no way to just edit the middle line?
The reason I ask this, is because I plan on doing a lot of custom user changes via GUI and writing the changes to a file every time would probably be very bad?
I think saving each line or cell in an array and editing the array would be a more efficient solution.
Any tricks or advice you could offer when editing CSV files?
Side note: I will probably be doing this in Java, as I am most familar with building GUI's with Swing, but I am open to trying it out in another language.