How to avoid that every time i write on CSV file it write row after row? - page 2

 
Simo Dodero: Hello, (first, sorry for my English...)

What I asked is how to avoid that every time I write to the CSV it change row, I want all data o the same raw, later (if condition is done) I will change row.

I mean i don't want this:  I'd like this:

Anyway I have still not read the documentation I received, hope o solve this ;-)

As already stated, you can use the "FileWriteString" for that. A text file (be it .TXT or .CSV) is basically "string" output.

Since in your code you already convert your data into strings (EnumToString, DoubleToString, etc.) when you output with FileWrite, you can simply substitute for the equivalent.

// from this
FileWrite( filehandle, ... );
// To this
FileWriteString( filehandle, StringConcatenate( ... ) );
 

Hello, i want to say that I could solve this issue usig FileWriteString(filehandle, string) ,so I had to create a string containing all my variables to write into a unique string using spaces as separator , something like this:

string stringfile=a+" "+b+" "+c;

FileWrite(filehandle, stringfile);

on next even I will need to change raw but I think there will be no problem, I hope !!

 

Thank's again ! 

 
Fernando Carreiro:

As already stated, you can use the "FileWriteString" for that. A text file (be it .TXT or .CSV) is basically "string" output.

Since in your code you already convert your data into strings (EnumToString, DoubleToString, etc.) when you output with FileWrite, you can simply substitute for the equivalent.

// from this
FileWrite( filehandle, ... );
// To this
FileWriteString( filehandle, StringConcatenate( ... ) );
Thank You, I will check StringConcatenate, at the moment it's solved.
Reason: