LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clean up the data that is writen to a spreadsheet?

I have several inputs that I am writing to a spreadsheet. How do I include headings to the data in the spreadsheet itself?
0 Kudos
Message 1 of 5
(2,820 Views)
I assume that you created a string which contains an array of the inputs that you want to write to the spreadsheet.

You can insert the headings to the top (beginning) of each element of your array. Depending on if you want mutiple columns or rows with the headings, you can rotate (transpose) the array appropriately.

You probably want to have multiple columns, one for each input type. Then multiple rows for each value (measurement, etc.). You can create a 2D array.

When you build your array, place the heading as the first element. Repeat that for each type (input).

-JLV-
Message 2 of 5
(2,820 Views)
No, I do not have any strings involved, evidently I need to, but I am not real sure how to go about doing that. Right now, I have several signals going into a "merge signals" block, the ouput of this is going to signals terminal of a "Write Labview Measurement File" block. That is all that I have right now, how do I incorporate the string?
0 Kudos
Message 3 of 5
(2,820 Views)
There are so many different ways to write data to file and so many different types of files to write that you will need to explain your application better. Do you want to write data that can be read by excel (search NI's site for .csv , a file format that excel can read)? Do you want to control excel from LabVIEW (look in shipping examples)? If you want to use the Write Labview Measurement File VI you have little choice about the data formatting. This block was intended to be used with the Read LabVIEW Measurement File so it does not have all the bells and whistles you can get if you format the file yourself.

You may want to use NI's advanced search page and search the examp
le programs. This page is excellent for comprehensive searches concerning tech support.
0 Kudos
Message 4 of 5
(2,820 Views)
Converting numbers to string is simple.

In the Functions Palette, go into Strings, and String/Number Conversion. You select the appropriate conversion method, for instance the "Number To Decimal String".

You can combine the strings by using "Concatenate Strings" (found 1 layer up), and then write the entire string to a file. You can also create a spreadsheet string, but you must first create an array. You can place a title at the top of each 1-D array and combine the arrays to make up multiple columns. The arrays can be rotated if you wish to have the titles appear on the first column (title in each row).

Do experiment. It's the best way to learn.

-enjoy-

JLV
Message 5 of 5
(2,820 Views)