LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output problem with 'write to spreadsheet file VI'

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!

0 Kudos
Message 1 of 5
(2,669 Views)

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

0 Kudos
Message 2 of 5
(2,663 Views)

Have you tried wiring a TRUE diagram constant to the "transpose" input? All better? 😄

0 Kudos
Message 3 of 5
(2,662 Views)

 


@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. 🙂

 

Message 4 of 5
(2,661 Views)

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

0 Kudos
Message 5 of 5
(2,652 Views)