LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write To Spread Sheet with nested for loop

Hi ,

I have a 3 nested loop running and how could I save all the data to excel file at the end of the day?

Please advice.

Thanks




Message Edited by Support on 06-12-2008 08:30 AM
0 Kudos
Message 1 of 10
(3,976 Views)
It does not really matter how many loops you have stacked, but how you accumulate the data.
 
Do you simply have a 2D array or something more complicated? How much data?
 
For long term data accumulation, I would append the new data to a file at regular intervals. It is not save to keep one day's worth of data in memory.
0 Kudos
Message 2 of 10
(3,973 Views)
Hi,

Please find the attached file. How could I save all the data in 1 file at the end of the day. By any means like append or what.

Thanks
0 Kudos
Message 3 of 10
(3,970 Views)
You are not showing how you want the data arranged. There are near infinite ways to arrange the data with your given code.
0 Kudos
Message 4 of 10
(3,965 Views)
Hi,

Any arrangement will do. Please provide me an example that you would arrange your data at your own way.

thanks
0 Kudos
Message 5 of 10
(3,958 Views)
Hi cheyne,

I doubt "any arrangement will do"! It's very crucial to put data in correct order... And one should know (or: define) data structures before actual programming!

Anyway: Here's a quick&dirty example putting all data in "random" order...



Message Edited by GerdW on 06-12-2008 10:08 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,951 Views)
Here's a completely different solution. It really depends on what you want.
 


Message Edited by altenbach on 06-12-2008 01:23 AM
Download All
0 Kudos
Message 7 of 10
(3,942 Views)
Hi,

How if I want to have the data in new row whenever the innest loop finish.

How i could do that? Please advice.
0 Kudos
Message 8 of 10
(3,937 Views)


cheyne wrote:
How if I want to have the data in new row whenever the innest loop finish.

That's what my example does. It will repeat the values for the slower outer loops, but will create a new row for each iteration of the inner loop. Try it!
0 Kudos
Message 9 of 10
(3,934 Views)
Thank bro. 🙂
0 Kudos
Message 10 of 10
(3,914 Views)