LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Spreadsheet File (How to Start New Rows)

Solved!
Go to solution

I am reading in signals from a hardware device and trying to write it into several columns using the Write to Spreadsheet File every few seconds.

 

My problem is every time a new signal comes in, my program seems to overwrite the previous signal when it writes to file, so when (say after 2 minutes) I go in to check the written file, it only shows 1 row of information. How can I fix this?

 

Attached is a portion of my VI and the output file.

Download All
0 Kudos
Message 1 of 3
(1,254 Views)
Solution
Accepted by topic author Kalyie

If the program segment shown in your image is inside a loop, then the Write Header section overwrites the file each iteration of the loop.  Then you only see the data from the last iteration.  Solution: Move the Write Header and Write Channel Names portions outside the loop or put them inside case structures which only execute when you want a new file or new Channels.

 

Lynn

Message 2 of 3
(1,246 Views)

Thanks! This worked after I moved the Write Header and Write Channel Names outside of the loop.

0 Kudos
Message 3 of 3
(1,238 Views)