05-22-2017 02:29 PM
Hi,
I have some data that's a sequential stack of numbers. Its a 3D array that gets generated out of a for loop.
Now I am having trouble in writing that data in Excel. I want the data to be stacked in columns, one adjoining the other.
I have looked at this page, tried the approach suggested by Dennis but it did not work out.
https://forums.ni.com/t5/LabVIEW/How-to-write-a-3D-array-to-file-spreadsheet-and-read-it-back/td-p/2... anyone point me towards any examples/ code that accomplishes this sort of thing?
05-22-2017 04:00 PM
05-22-2017 09:08 PM - edited 05-22-2017 09:09 PM
I have some questions.
Bob Schor
05-23-2017 05:28 PM - edited 05-23-2017 05:58 PM
Hi Jeff,
Please see the attached sample VI. How do you create a mechanism in which I find multiple data sets (corresponding to the first index in this VI) written adjoining each other in a MS Excel program? I have used the Write to Measurement file within the second loop that makes the different data points stack one on top of the other. Is there any way to put them in a series of columns?
The actual code I am working on is a computer vision algorithm which has output from a subVI (in its own loop) and that has to be concatenated with an array from a for loop in the main VI that creates a 3D array.
05-23-2017 05:37 PM
Hi Bob, Thanks for replying.
05-23-2017 06:39 PM
Something like this?
05-24-2017 07:06 PM
StephenD showed you how to change a 3D array of 3x3xmany into a 2D array of (3*many)x3 array (the third-dimension's 2D arrays are stacked vertically).
If you have the Report Generation Toolkit, generating an Excel .xlsx file containing such a 2D array is very simple. You use New Report (specifying Excel), an Excel Easy Table (with the 2D array wired to its 2D input), Save Report to File (to which you've wired the path to the .xlsx file you want to create -- don't forget its extension) and Dispose Report (to close Excel).
Bob Schor