Mrluck07:
I suppose you meant the fourth number in the row. First you have to read over the first three numbers and then the fourth one. If there is comma "," as a delimiter in your csv file you have to declare it in FileOpen() because the default delimiter is semicolon.Hi, i need help to get a number from a CSV file, and assign it to a variable, this CSV file is very simple, it only have numbers and commas,
Thanks for any help
int handle=FileOpen("file.csv", FILE_CSV | FILE_READ,','); double val; for(int i=0;i<3;i++) val=FileReadNumber(handle); val=FileReadNumber(handle); Comment (val); FileClose(handle);
Petr Nosek:
I suppose you meant the fourth number in the row. First you have to read over the first three numbers and then the fourth one. If there is comma "," as a delimiter in your csv file you have to declare it in FileOpen() because the default delimiter is semicolon.
Thanks a lot Sir, for explaining to me, it worked perfectly, have a great day
I suppose you meant the fourth number in the row. First you have to read over the first three numbers and then the fourth one. If there is comma "," as a delimiter in your csv file you have to declare it in FileOpen() because the default delimiter is semicolon.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, i need help to get a number from a CSV file, and assign it to a variable, this CSV file is very simple, it only have numbers and commas,
Thanks for any help