LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write header and mixed data to spreadsheet

Solved!
Go to solution

Hi everyone,

 

I am having some problems writing my data to a spreadsheet file... Basically, I have crunched my data and obtained the values I want... When I stop the the loop I want the data to be saved to a spreadheet file... The first line should be a header, and the lines below should be the corresponding data consisting of a string and numerical data... See example below.

 

Subject Name, Max Force (N), Mean Force (N), Min Force (N);
David, 2134, 23, 284;
Phil, 1234, 43, 321;
Tina, 4059, 335, 55;

 

Can anyone please help with this?

 

Kind regards,

Jack

0 Kudos
Message 1 of 4
(3,889 Views)

Since you are writing everything at the end, convert your array of data to string, and then prepend your row of headers.

0 Kudos
Message 2 of 4
(3,879 Views)
Solution
Accepted by topic author jcannon

this will create a file(test.csv), checks if file exists(no: creates header plus data...if yes:appends data only):save vi to a folder first...test.csv will be saved in that folder also.

 

HEADER.png

0 Kudos
Message 3 of 4
(3,877 Views)

Hi apok,

 

Thanks heaps for this... Works a treat!

 

I made a couple of changes... See attached anyone interested...

 

Kind regards,

Jack

0 Kudos
Message 4 of 4
(3,821 Views)