LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing appending data in a spreadsheet

Hi,
In appending data into a spreadsheet how does one clear the data in a spreadsheet after the first test is done, so the data in the spreadsheet doesn't get bigger and bigger and the spreadsheet won't have any data in it until the second test commences?
Jason
0 Kudos
Message 1 of 6
(3,385 Views)
There are a number of ways to implement what you want, but if we do not know the structure of the code that you have, it is impossible to decide where the fix needs to be.
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 2 of 6
(3,369 Views)
The simplest way I can think of is to close the file after a test, and open it again (Open File.vi) with the option "replace file".
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
Message 3 of 6
(3,368 Views)
Here is a copy of one of my test VI's. I am not sure if the main VI should be added too. That's a pretty huge file though.
0 Kudos
Message 4 of 6
(3,366 Views)

It's unclear whether you want a new file each time the subVI is called or not. If it's each time, then as already mentioned, you just have to wire a False to the append to file input.

p.s. Your conversion to 1D, then 2D, etc, is pretty convoluted. If you want to stick with the Write to Spreadsheet File, below is a cleaner way. Since you are only writing a single line at a time, using the Write Text File will work just as well.

Message 5 of 6
(3,353 Views)
Dennis,
What I would like to do is to send each cases data into one file then to read that data and put it into a test report. That's why I asked about clearing appending data, because if the data is appended then it will add continuously until a statement says not to. I am not sure if this is the best way to go. Mainly I want to take data from each case statement which in this case there are 4 of them and store that data into one spreadsheet. I would like to have the user to have the ability to redo any one of the case statements data without changing the location of that data on that spreadsheet. As an example if test 1 and 2's data was fine, but test 3's wasn't. If the user decided to redo test 3 I would like the program to still have test 1 and test 2's data the same as previously at the same location but only test 3's data changing to the last test. If that doesn't make any sense let me know.
Jason
0 Kudos
Message 6 of 6
(3,326 Views)