FileWrite() delimiter

 

Is it possible to change the delimiter from semicolon to a comma?

I am exporting data to a program that will not recognize the semicolon.

 
fxtraydor:

Is it possible to change the delimiter from semicolon to a comma?

I am exporting data to a program that will not recognize the semicolon.


Nevermind, I figured it out.
 

Hey bud,
Can you share how you figured it out?

Would be really helpful, thanks!

 
Paul Strawford #:

Hey bud,
Can you share how you figured it out?

Would be really helpful, thanks!

I doubt that's going to happen because the user is deleted.

Anyway, I moved on to MT5 many years ago but I'm pretty good at targeted searching...

Forum on trading, automated trading systems and testing trading strategies

CSV: unable to write separator semicolon (';')

Alain Verleyen, 2019.09.17 16:42

Last build is 1220.

I think there is an other problem, this line SHOULD create a CSV with ; as separator.

int Handle              = FileOpen("fileName", FILE_CSV|FILE_WRITE, ';');

Please post code to reproduce the issue (code which compiles and can be run).


 
Paul Strawford #:

Hey bud,
Can you share how you figured it out?

Would be really helpful, thanks!

I've only every done it this way, and create text for each line programmatically in a loop etc putting in the delimiter of choice..


string text1="line1,test1",text2="line2,test2;
int f=FileOpen("test.txt",FILE_WRITE);
  FileWrite(f,text1);
  FileWrite(f,text2);
 FileClose(f);
        
 
andrew4789 #: I've only every done it this way, and create text for each line programmatically in a loop etc putting in the delimiter of choice..

Text files (non-CSV) do not have delimiters, CSV files do.