09-09-2009 06:31 PM
Hello
im new at labview, so im sorry if the question is too simple
How can I save a cluster to spreadsheet or text file, i saw it can be easely saved into a binary
but i have no knowladge to work with binary
thank in advance
09-09-2009 08:02 PM
03-20-2013 10:05 AM
Hi,
I am also currently facing the same problem.
I'm trying to write a cluster of 3 elements( 1 string and 2 integers) into a spreadsheet or text file, which i can access outside of labview.
How can I go about in doing this?
Thanks
03-20-2013 10:16 AM
I would unbundle the elements and use Format to String to create a line for the CSV/tab delimited file.
03-20-2013 10:50 AM
however, mine is actually an array of clusters, and i'm trying to send this into a text file in the format as shown in the attach file.
Any idea to go about in this?
my purpose is when I change the value in the input array of cluster, it will update on the test file itself.
Currently my method is keep importing the values of the inputs into the file without appending.
03-20-2013 11:18 AM - edited 03-20-2013 11:19 AM
This is basically what crossrulz was saying. You just need to loop through your elements now instead of having a single element. Bad idea though, to save on every value change. You should give the user a save button. No need to write to a file every time a value changes. Could you imagine if every program you had was writing to a file every time a single value in the config was updated! It's a bit of overkill. However, because it's what you requested, it's what I have shown in this example.
03-20-2013 02:07 PM
09-02-2017 04:20 PM
Nice...
In an avoidance of MAX I built an array of clusters which allows a settings tab to dynamically select and configure a subset of PXI counter behaviors (count, measure frequency, super easy to expand) and my intent was to save off profiles to a human readable/editable file.
You saved me at least half an hour. I will return the favor one day.
thanks,
-methods
09-02-2017 04:47 PM - edited 09-02-2017 04:53 PM
Test Results:
* The human readable output in the spoiler above came out perfect, good exercise for regular expressions, but hard to scale with a monster cluster as you have to grind into the fussy.
* The XLM functions are insanely simple. Data string not so human readable... but you can read the XML *good enough* to get you out of a pinch.
Flatten to XML wins in my case for being so insanely clean. Who knew you could feed an array of clusters into a yellow box and get on with your business :-).
thanks,
-methods
EDIT: of course both ways