Writing to new columns in CSV format

 

this code produces the file shown:

int start()
  {
   int handle = FileOpen(Symbol()+"_logfile.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');
 if(handle>0)
  {
   //write file header
   FileSeek(handle,0,SEEK_SET);
   FileWrite(handle,"Symbol","idiot","idiot1","idiot2","idiot3");
   for(int i = 1;i<10;i++)
   { 
   
   FileWrite(handle,Symbol(),1,i+1,i+2,i+3);
   }
  }
  FileClose(handle);
  }

 

 

How can I open this at a later time (in same program) and add data to columns 'F', 'G', 'H' whilst still keeping existing values in other columns?

thanks 

 

hello

Did you find a solution to this?

Another problem I have is:

I want .csv template file As below picture, and don't change template every time (File)Read and (File)Write .

thanks.


csvTemplate

CSV Template

Reason: