You need to open an Excel file in csv format and get data from it. I found similar questions on the forum, but I couldn’t open them.
int filehandle=FileOpen("1.txt",FILE_CSV|FILE_READ,";");
if(filehandle!=INVALID_HANDLE)
Alert("File is open");
The code is simple. And why is the file always deleted from the folder in the tester after various debugs? The file contains data via “;”
How to open an Excel csv file
Share
barabashkakvn
The code from the first post is working. It’s all about HOW you run your code and WHERE the file lies “Si.txt”.
In general, place your file in a shared folder, and use the FILE_COMMON flag to open it.
fresto
Yes, I have already dealt with this issue. I couldn’t get the folder wrong. There is a script that opens the file for writing and if there is no file, creates it in the same folder. And all the same, I threw it in the Files folder, where the terminal is, and in the Files folder where the tester is.
Approximate course of action :
The file is in the folder.
The data file
The code of the EA
The result is -1 = Error opening file
The file in the folder is deleted after debugging