02-10-2012 11:21 AM
Common question I suppose, but I'm still having issues despite reading several posts about the issue.
Problem is I'm trying to write a 1D array of data to 1 column in an excel document. However, unless I add an artificial column (of blank values or some other bogus #), ActiveX only writes the 1st value of my array to the column.
Look at the attached. In Picture 1 I add an articial column and everything writes fine. In Picture 2 I don't add this column and only the 1st value of the array gets written in each row.
Suggestions?
Thank you.
Solved! Go to Solution.
02-10-2012 11:30 AM
The wiring in Picture 1 is unclear. There is a wire junction that is hidden behind the transpose array function. Is the 2-D array going to Excel coming from the 2-D array before or after the transpose array?
02-10-2012 11:42 AM
The transposed array is sent to the junction.
02-10-2012 12:13 PM - edited 02-10-2012 12:16 PM
I haven't done much with Excel and LabVIEW by way of ActiveX. Creating a small VI and duplicating what you show in your screenshot, I see the same behavior.
I believe that Excel interprets a 1-D array as something that runs horizontally. So a 1-D array consists of a single row of cells and N number of columns.
(Actually LabVIEW interprets a 1-D array like this as well, but it allows you to show an array onscreen either vertically or horizontally.)
Converting to a 2-D array and transposing is what you need to do to have that 1-D array be treated as a single column of cells.
Note that you don't have to use build array and append an empty array to it. You can just use build array as is and it will turn a 1-D array into a 2-D array.
02-10-2012 07:00 PM
Seems that did the trick Ravens Fan.
1 more question (and yes I have tried other solutions online):
Is there a way to set the max/min limits on x/y axes on a chart in a given sheet?