04-23-2014 08:11 PM
I have numbers (data) being calculated in a variant and I need this data to be writting into different columns into excel. Can anyone help?Thanks in advance
Solved! Go to Solution.
04-23-2014 11:21 PM
You can use varient to data function available in Function Pallete--> Cluster --> Varient --> Varient to Data
04-24-2014 11:55 AM - edited 04-24-2014 11:55 AM
We need more information.
Is the file you are writing to an existing file or one you are making?
What is the file format (CSV, TSV, TXT, XLSX etc).
Why are you dealing with a variant and not the numeric it self? Use the Variant to Data to get your number back out of a variant if you are using a variant.
What code have you tried? (post it)
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-24-2014 12:43 PM
It is CSV data. I tried using Variant to Data and using the type i would like the data to be displayed in, but its just giving an error.
04-24-2014 12:56 PM
Here is a pic
04-24-2014 01:04 PM
You aren't using those functions properly. Read the help. You are writing a name of an attribute but no data, the you are trying to write more attributes but no data, then you are saying to read the data of the variant as an array but you never wrote an array of numerics.
Variants have two components. The data, and attributes. The data can be anything, and you can have any number of attributes (like a look up table) where each attribute can be anything. In the attached example I write an array of I32 numbers to the data, then write a string to the attribute. Then I read the attribute string, and then I read the array data. The data types must match.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-24-2014 01:19 PM
Very good example. Thanks for your help!