Discussion:
Creating a header for a .CSV file
(too old to reply)
glstill
2008-08-15 15:40:09 UTC
Permalink
Hi, I have looked through the forums and cannot find a solution for creating a header for a csv file.  I am using Labview 8.2.  I want a label for each column at the top of the file and then I will append new rows to the file as the data is collected.  An example of what I am looking for is attached.
 It would also be nice to have the labels descending in the first column, pretty much a transposed version of what was described above.  Thanks,Gary 


exampleLOG.csv:
http://forums.ni.com/ni/attachments/ni/170/349632/1/exampleLOG.csv
smercurio_fc
2008-08-15 15:40:10 UTC
Permalink
Simply call the Write To Spreadsheet File twice. The first time you wire in a 1D array of strings which is your column headers. Then, you call it when you're writing out your data. Make sure you wire a True constant to the "append" input for that function.
glstill
2008-08-15 16:40:18 UTC
Permalink
Thank you very much.  That worked well.   If i wanted to transpose the data how would I do that?  I can get the header to be vertical, but I cant get the data to append to the 2nd column , and then the third and so on with the data descending from top to bottom.  I attached an example of what I might want the file to look like. Each column would be added one at a time.


data3.csv:
http://forums.ni.com/ni/attachments/ni/170/349653/1/data3.csv
smercurio_fc
2008-08-15 16:40:20 UTC
Permalink
Errr.. I'm a tad confused now. Which format are you looking for? Columnar (first example, and the most common) or row (second example)?
Loading...