Working with files - add some variables to the existing line in .CSV file

To add comments, please log in or register
parham.trader
668
parham.trader  

Hi friends,

I've coded to write some variables in different lines in a .CSV file. The file consists of 5 lines. Now I'd like to add some new variable to the end of the second line in my file. I'd like to know if it is possible to add some new variable to the end of the existing line in a file or not. if yes, I'd appreciate if anyone can share his idea on how to do so.

thanking in advance;

parham.trader
668
parham.trader  
Any idea !?
Marco vd Heijden
Moderator
12699
Marco vd Heijden  

I dont know about that but i usually overwrite the entire thing with the new data.

Alain Verleyen
38676
Alain Verleyen  
parham.trader:

Hi friends,

I've coded to write some variables in different lines in a .CSV file. The file consists of 5 lines. Now I'd like to add some new variable to the end of the second line in my file. I'd like to know if it is possible to add some new variable to the end of the existing line in a file or not. if yes, I'd appreciate if anyone can share his idea on how to do so.

thanking in advance;

That's not a good idea to do that with a CSV file. This is something which can be done easily with a binary file.

Anyway, if your file is only 5 lines, do as suggested by Marco.

To add comments, please log in or register