LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save spreadsheet data to every row

I have developed a vi that acquires information from sensors that measure pollution levels from vehicle emissions.  i whish to save all the recorded data as a spreadsheet for this I am using write characters to file.vi as the method of saving my data, however when I open the spreadsheet the data is not written to every  row instead it is written to every other row.  Can anybody shed any light on why this might be happening. (See DATARECORD.csv)
I have attached
 
0 Kudos
Message 1 of 3
(2,498 Views)
I can't run your VI since I don't have the instrument but just doing the Write Characters to file with some dummy data, I can't reproduce the problem. Can you post the .csv file that you've created?
0 Kudos
Message 2 of 3
(2,493 Views)
Try setting the format string input to the array to spreadsheet primitive to "%s" instead of an empty string.

As a side note, the write characters to file VI opens the file, writes the characters, then closes the file.  This is very inefficient to do inside a loop.  Consider opening the file before the loop and closing afterwards.  Pass the references in with shift registers.  You can find the VIs to do this by simply opening the write characters to file VI and copying the contents to the appropriate places in your VI.
0 Kudos
Message 3 of 3
(2,469 Views)