From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-17-2010 11:23 AM
Hi,
I have previously used LabView 8.5 to carry out the following action, but as I am now working on a different system I am currently forced to use LabView 8.0 (Windows XP), and would ideally like to avoid upgrading to LV8.5+. However if I cannot carry out the following then i will have to!
I am wanting to create a spreadsheet, and am using the "Write to Spreadsheet File.vi" block within LabView. However, as I want to have column headings included, I am building an array of strings by using the "Build Array" block. This array is then fed into the "1D Data" input on the 'Write to spreadsheet' block. The format for the spreadsheet block is set by a string with "%s" going into the "Format" input. In LV8.5, the array connects fine, but in LV8.0, when I connect the output of the string array to the 1D data input, the wire becomes broken. The same happens when I use the 2D data input.
If I'm not doing anything wrong, how can I put headers into my spreadsheet file? Is this possible in LV8.0, or will I need to upgrade?
Thanks for the help!
Solved! Go to Solution.
03-17-2010 11:59 AM
I can't recall whether or not "Write to Spreadsheet File" was polymorphic in 8.0, but it seems that it wasn't (based on your description of what you're seeing). Maybe I am wrong, but if I'm right, here's what I'd do:
I'd use "Array to Spreadsheet String" (found on the strings palette) to convert your numeric data array to a spreadsheet string. You could do the same thing with your header string as well, if you wanted. Then I'd concatenate the resulting strings, header string first (I probably didn't have to say that, but there it is). Then I'd use "Write to Text File" to write the whole shebang to a file. Note that you'll have to explicitly open (or create) the file, write to it, then close it. "Write to Spreadsheet File" does all that stuff for you already. This way won't, so you'll have to do it yourself.
Maybe someone else has a better solution, but that's what I'd do. Hope it helps!
03-17-2010 12:49 PM
03-18-2010 09:49 AM