Is there a way to have multiple formatting methods for a Write to Spreadhseet command? Like I have an array that I want to have specific columns formatted different ways.Or can you only format the whole spreadhseet file one way?
Solved! Go to Solution.
when you talk about the WriteToSpreadsheetFile function: yes, you can only have one format for all elements.
You could create your own conversion routine easily as the CSV file format is just pure text using tabs (or comma or semicolon) as separator between the elements…
Ok thanks, is there anyway to format the individual arrays before I input them into the spreadsheet file itself?
You could use any of the NumberToString formatting functions and then build the 2D array on your own using array functions.
Basically I'm trying to create a spreadsheet for value of V,I and R. I need the values for V and R to be in decimal units and I need the values for I to be in exponential format. Previously I didn't care about formatting each of these sets of data differently. I had previously just been wiring the 4155 download trace driver to a 3 element array then transposing the array. I then would write this to the write to spreadhseet function. I'm not sure what the best way is to go about formatting the individual datasets without completing reworking the code I had written before. I've attach a screen shot of what I was doing before.
please attach a real VI. Your picture shows some unrelated code in a blockdiagram that could be improved a lot from AutoCleanup…
The interesting part of saving the data is hidden in a subVI!
Attached is a VI which does exactly what you want. It is implemented in the simplest possible way, writing the data to disk a row at a time. If you have more than a few thousand rows, you will want to do this in a more efficient way. Let me know if you need this modification.
Code is in LabVIEW 2011.
No that code works great, thanks! I actually had sort of fixed the problem by formatting the values into a string then formatting them before building them into an array. Probably not the most efficient way of doing things but it worked.