LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate Write to Spreadsheet

            "That's what I thought.  The constant should be set to 0."


No, the row constant is set to 1 to write the second row.  The index of the array size is 0 for the number of rows.

You are making this too complicated.  After studying your code, it seems as if the first and second rows will always be updated.  Previous data is never written back to the file.  The best way to do this is to gather the data, build the 2D array, then write the whole thing to the file with append = false so that the entire file gets overwritten. 

I re-wrote the vi, but somehow it got lost.  Give me a few minutes and I'll try again.

 

Message Edited by tbob on 10-25-2005 01:50 PM

- tbob

Inventor of the WORM Global
0 Kudos
Message 11 of 14
(776 Views)

OK here it is:

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 14
(772 Views)
You're alternate scheme works great and all, but it requires that one must finish all of the frames to record the data.
 
What if there were a lot more frames (>200) and the user just wants to complete the first half before lunch time.  If he exits the program, none of that valuable data would be saved, and the user would have to redo all of those frames again plus the remaining frames just to save the data.
 
I need to be able to write to the spreadsheet in each frame, just in case the user isn't able to complete all of the frames.  Each piece of data needs to be in a specific cell so that the data can be recalled when the user reenters the truck number to resume the test.
 
Can your scheme be modified for this functionality?
 
Thanks,
 
Drew
 
 
 
 
0 Kudos
Message 13 of 14
(765 Views)
Now this is an entirely different problem.  For this problem, you should create a For loop to loop through each "frame".  Put a case structure in the loop and have your first frame code in case 0, second frame code in case 1, and so on.  Read the spreadsheet before the loop, initialize shift register with the data.  Inside the loop, after the case, decide whether to use Replace Array Subset or Insert Into Array, by looking at the number of rows in the 2D array.  Then add/replace the row, then write to spreadsheet and update the shift register.  See attached code, open version III of Write to spreadsheet vi inside the LLB.
 
- tbob

Inventor of the WORM Global
0 Kudos
Message 14 of 14
(755 Views)