LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write string and numeric in array?

Hello all,

I am trying to write an array to file (to be used in excel later) where the first column is a string (descriptive term) and the second column is a number associated with that descriptive term.  How do you save these two different data types in the same array.  I have tried to convert all to string or all to numeric but have been unsuccesful.  Any ideas?

Azazal

Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 1 of 4
(2,952 Views)
Did you try using cluster array?
Message 2 of 4
(2,944 Views)
You can't mix data types in an array. They have to be either all numerics or all strings. What are you using to write to file? Write to Spreadsheet will only work with numeric arrays but can be easily modified to save string arrays. There is a description on how to make the changes on the block diagram. If you want to make these changes, save the VI as a new name and in a new location.
Message 3 of 4
(2,945 Views)
I worked around the problem by converting everything to strings, then writing to a table...works great.

Thanks for the input!!!
Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 4 of 4
(2,935 Views)