10-13-2015 03:09 PM
How do you write the content of a Variant to a File Excel
10-13-2015 03:43 PM
10-13-2015 03:48 PM
Are you talking about the variant data or variant attributes (or both)?
Excel is a proprietary microsoft format. Easiest would be to use "variant to data" and then use the report generation tools for excel. What is the data structure?
10-13-2015 03:52 PM
Well there are many ways people have came up with for converting a variant to a string. OpenG and MGI both have a read/write anything to an INI format which in the low level of the code generally means converting each of the expected data types to a specific format. This makes the data structure more readable, but increases the file size needed, compared to a binary write. If you want to write something yourself I'd start with one of these.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-13-2015 03:53 PM
Thanks MattJ and Altenbach for your response. Sorry i wasn't clear before It is the attributes as they update in the Variant in the variant. I have Strings and Decimal numbers and Names thats constantly being updated at random times. What would be best to write it to a file. I do not have report generation tool kit.
10-13-2015 03:54 PM
thanks for your reply i will check that out.
10-13-2015 04:27 PM
Does it need to be a human readable formatted file? (Any formatted file typically converts numbers to decimal and the data is never exactly identical to the original binary representation)
What's the purpose? If you just want to save the variant (including all data and attributes), just write it to a binary file. Later you can retrieve it and get everything back unchanged. Works beautifully!
10-13-2015 04:44 PM
I will try that out and if i have any issues i will come back for help, but if it works i will also let you'll know. Thanks for your help.