Scripts: Simplest CSV file reader - page 2

 
This is just excellent, makes the job easier and faster. You deserve ten programmer coins. I think we should have a cryptocurrency for programmers too. Cheaper but substantial that you can just gift a programmer coin to a deserving individual. Thanks Man for this package
 

Dear Denis,,

Your script and class has really helped me a lot I have spent over 24 hours trying to see hour I could read multiple lines from a CSV five. I just got it now with this scripts thanks a lot.


I however need more help, The file I want to read is in my common folder, as I have multiple platforms accessing it.  I would normally use handle and the normal format such as handle=FileOpen(fileName, FILE_READ|FILE_ANSI|FILE_COMMON, ";"); to access the file for read or Write with MQL4. 


I had to move the file into my MT5 file folder to use your program, I would like if you can help with how to access it from my "...Terminal\Common\Files" folder

Thanks a lot in advance

 
saved me a lot of hustle
 


//+------------------------------------------------------------------+
//| Return column name from 1st line of the file by index            |
//+------------------------------------------------------------------+
string CDKSimplestCSVReader::GetColumn(uint aColumnIndex, string aErrorValue = "")
 {
  string keys[];
  int values[];
  Columns.CopyTo(keys, values);

  if(aColumnIndex < ArraySize(keys))
    return keys[aColumnIndex];
  return aErrorValue;
 }

in build 5100, 6 Juni 2025,
that code have error, friend

 
Sugeng Lutfi Yatama #:


in build 5100, 6 Juni 2025,
that code have error, friend

string CDKSimplestCSVReader::GetColumn(uint aColumnIndex, string aErrorValue = "")
 {
  string keys[];
  uint values[];
  Columns.CopyTo(keys, values);

  if(aColumnIndex < (uint) ArraySize(keys))
    return keys[aColumnIndex];
  return aErrorValue;
 }
change the values from int to uint and type cast the ArraySize to uint
 
Blessing Dumbura #:
change the values from int to uint and type cast the ArraySize to uint

ok, thank you for help, friend.

 
Very nice class.