01-20-2011 06:44 PM
I have a problem with the format of output from 'write to spreadsheet file VI'
I have a 3-element 1D array, and I want to write it out in 3 columns (X Y Z) the 'write to spreadsheet file' VI always give me one column, as follows:
X
Y
Z
how I can output as X Y Z?
Any suggestions? Thanks!
01-20-2011 07:03 PM
Use the transpose input. I was not sure it worked with a 1-D input so I tried it and it does.
Transpose? = False: 1 2 3
Transpose? = True: 1
2
3
Lynn
01-20-2011 07:04 PM
Have you tried wiring a TRUE diagram constant to the "transpose" input? All better? 😄
01-20-2011 07:07 PM
@johnsold wrote:
I was not sure it worked with a 1-D input so I tried it and it does.
Instead of actually trying, I simply looked at the code inside. The 1D array gets built into a 2D array before the transpose operation, so it will work. 🙂
01-20-2011 07:33 PM
I actually read the detailed help. It says that 1-D arrays are converted to 2-D but it was not clear about the effect of transpose.
By looking at the diagram you can also see that it uses a dialog for errors. This is not described in the help file. So this VI would not be good to use in an application intended to run unattended.
Thanks for reminding us that the diagram is accessible on most vi.lib VIs.
Lynn