LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting data using write to measurement file

Hi all,

For this project, I am using an Arduino MEGA to communicate to my SPS30 (because there is already source code to parse the data into the bins). My question is, now that I have the parsed data, how can I send the data to excel? I tried using write to measurement file, but only the very last data values are stored and it's not formatted to how I would like it. How would I get all of the data values to show in the excel file? And how can I format it? 

 

Here is what my data looks like in the excel sheet:

Dvlasenko_0-1616085915599.png

 

My goal is to get the data to look something like this:

Dvlasenko_1-1616086259643.png

 

Here is a snippet of my code:

 

0 Kudos
Message 1 of 3
(803 Views)

Take some tutorials so that you learn about LabVIEW dataflow.

How to Learn LV

 

The reason that it only gives you the last data is because that is the way you programmed it.

 

Move the Write to Measurement File inside the loop to get all the data.

 

As for formatting, if you play with the settings inside that Express VI, you can save it as a text file with a tab or comma delimiter.  If you save with a comma and give it a .CSV extension, Excel will import it automatically when you open the file in Excel.

 

What version of LabVIEW do you have?  Newer versions of LV have the option to save to .xlsx

Message 2 of 3
(800 Views)

Thank you for the response! Very helpful. I have LV 2018.

0 Kudos
Message 3 of 3
(766 Views)