01-10-2011 06:28 PM
Hello,
This may be a really dumb and obvious question, but I have only been working with LabVIEW for two days. I am trying to retrieve data from a .csv file and display it to a front panel. I have been able to do this, but what I want to do is retrieve the values, then put those values into an array, then allow the user to adjust those values, and click on a button and save the file back to the same file that the values were pulled from. I can read the values into an array and display them fine, and I am able to take an array and write it back to the file, but I need a way to be able to use just one array that is displayed on the front panel. Basically, what I am trying to say is that I want to get a snapshot of a .csv file and display it on the front panel where the user can adjust the numbers from the file, and re-write them back to the .csv file and close the front panel. Is there an easy way to do this? I appologize if this is not clear or it has been answered on here before. Remember, I am new to this whole thing!
Thanks in advance.
Solved! Go to Solution.
01-10-2011 06:33 PM
Have you looked at the table control? It is a 2D array of strings. You can use read from spreadsheet file and save to spreadseet file.
01-10-2011 06:59 PM
It looks like it is reading the csv file into the table control just fine, but I still cannot adjust the numbers coming in on the front panel. The table control that I am using only has an input. I just ran a parallel wire coming off of that into a case statement with the write to spreadsheet file constrained by the accept button. I have attached my screenshot. I'm sure this isn't how to do it, but can you advise?
01-10-2011 08:38 PM
hi,
Actually You are using while loop... So actually the data will get create new files continuously...Better try for event structure...
01-10-2011 09:07 PM
If you want the user to be able to change values, you need a control and not an indicator. The problem has nothing to do with loops. If you were to change it to a control and write to a local variable, everything should work.
01-10-2011 09:22 PM
ya, Dennis is right...
What ever be the input, user give is not reach inside the while loop... So better make it as a control and update the values inside the loop using a local vaiable...
01-10-2011 09:24 PM
No. The local is wriiten to outside the loop and the control is read inside - no locals inside.
01-10-2011 09:31 PM
I got it....
01-11-2011 08:27 AM
Looks like that got it. Thanks alot for the help!