06-21-2012 04:24 PM
Good afternoon,
I am new to LabView, and am trying to write a VI that will eventually run a set of calculations on a data set with several millions of data points. I want the VI to count the number of data points imported from the .CSV file as they are written into an array. The number of points will eventually help me to determine the end behavior of my calculations, so it's not optional.
I am having trouble getting the file to read each successive row. The "For Loop Iteration" value is feeding into the "Start of Read Offset" of "Read From Spreadsheet File.vi" . My intention was that this would result in a new row being read into the array with each iteration of the loop. What I'm getting is the first value read over and over again into the first row of the array. Any ideas?
Thanks for your time and help,
Wes
Solved! Go to Solution.
06-21-2012 04:41 PM
Why not just use the Read from Spreadsheet to read the whole file at once. Why read it a line at a time? If they file is extremely large you can read it in chunks but reading it line by line is not very efficient.
06-21-2012 04:44 PM
I'm reading it one line at a time so that the loop iteration will increment with each line, giving me the sample size.
Is there a more efficient way of counting how many data points are imported? I wasn't able to find another way...
06-21-2012 04:45 PM
@JWTyler wrote:
I'm reading it one line at a time so that the loop iteration will increment with each line, giving me the sample size.
Is there a more efficient way of counting how many data points are imported? I wasn't able to find another way...
There is a nice VI called "Array SIze" that will also do that for you.
06-21-2012 04:47 PM
Wow. Alright.
I'm not sure how I missed that one...
Thanks for the help!