Im currently trying to program some scripts/EA´s that export some date of the markets for future analisys of that data in a .csv file.
Im very new on this and I have used this function for now:
void WriteCSV() {
int handle = FileOpen( StringConcatenate( Symbol(), ".csv" ),
FILE_CSV|FILE_READ|FILE_WRITE, ','
);
if ( handle > 0 ) {
FileSeek( handle, 0, SEEK_END );
FileWrite( handle,
TimeToStr( TimeCurrent(), TIME_DATE )
);
FileWrite( handle,
"hello" );
FileClose( handle );
}
}
But in my excel file appears both in the same column:
2014.10.24
hello
In the cells A1 and A2. But I would Like the data to be writed in A1 and B1. Anyone call tell me how I can move to the right column? Could I retrieve the cell "name" (B2, J5, ...) that is going to be written??
Thank you
EDIT: I just had to use the delimiter ";"
Im very new on this and I have used this function for now:
void WriteCSV() {
int handle = FileOpen( StringConcatenate( Symbol(), ".csv" ),
FILE_CSV|FILE_READ|FILE_WRITE, ','
);
if ( handle > 0 ) {
FileSeek( handle, 0, SEEK_END );
FileWrite( handle,
TimeToStr( TimeCurrent(), TIME_DATE )
);
FileWrite( handle,
"hello" );
FileClose( handle );
}
}
But in my excel file appears both in the same column:
2014.10.24
hello
In the cells A1 and A2. But I would Like the data to be writed in A1 and B1. Anyone call tell me how I can move to the right column? Could I retrieve the cell "name" (B2, J5, ...) that is going to be written??
Thank you
EDIT: I just had to use the delimiter ";"
Greetings, BeLikewater