I need to read a csv file that contains some numbers and grab this data and play in an input field, however it is reading all the data at once and I need it to read one every cycle the robot makes.
For example it takes the value of the first column and after it does the whole process it takes the value of the second cell and so on
Hi,
well if after one cycle made by the robot the CSV file updates, you can read all the data (many times as the lines in your CSV file) and uses a counter (integer variable) to identify the column and the line.
If the CSV file doesn’t sofer any change, then you can use a for each row to go through all the file.
Hello Beatriz,
You need to change the type of your variables to INT, and for know the lines of your CSV file you can use something like ‘numberRowsCSV = yourDT.Rows.Count’, your condition, in do while, will be like: ‘count <= numberRowsCSV’.
Remember, if the CSV file doesn’t update every cycle you just need to use a for each row to read him.
the data from the csv file never changes, however the moment I use the foreach it tries to impute all lines at once only in the imput field.
I found that using the counter in the first “cycle” it would verify that it would need to get the first cell, then the second cell until all the csv rows have finished.
as the images show, the first line would be the value 41998258247, but it tries to put all the numbers of the csv file in the same field as shown in the first image