Skip line when reading csv file...

 

Hi,

When reading a csv file into mql4, I need to know how I can skip to the next line of a csv file and also how I can delete just one line from the file.

Thanks

 
bool FileIsLineEnding( int handle)

For CSV file returns logical true if file pointer is at the end of the line, otherwise returns false. To get the detailed error information, call GetLastError() function.

.

afaik, no way delete in-situ. would need o/p file. write all lines wanted and skip those not wanted. file functions are lo level. you need emulate such functionality in your code.

see also: FileTell() for info of where a csv line begins etc. a bit of creative use of FileReadString(), FileWriteString() and FileSeek() could be employed...

perhaps explore win's api's. maybe ability to manipulate files as you required via #import construct interface...

.

perhaps better still would be to consider alternate design so can dump need for line delete ;)

Reason: