LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

taking the kth-column of multiple files and then joining them together in a single file

Hi
I would like some help with array manipulation
I have multiple (1000) files with 5 columns each and 20,000 rows. The first row of each file has a header that labels the columns.
 
I would like to be able to read these files, pull out colum 3 from each file and then build these into a new 2D array. It would be nice if they also had their corresponding header labels. So then I would end up with the new 2D array containing 1,000 columns (corresponding to column 3 of each of my 1000 files) with 20,000 rows plus a first row with the header labels.
 
I would also like the option to in future select column 2 for example, or column 5; plus I would also like the functionality to allow me to perhasp pull out more than one colum, e.g. colum 2 and 3, before we build the new array.
 
I hope I made some sense and that someone can help. Thanks you
0 Kudos
Message 1 of 3
(2,753 Views)

RVR,

This is a great exercise to get familiar with LabVIEW's array functions.  A great place to start is actually the LabVIEW help on arrays, located here:
https://www.ni.com/docs/en-US/bundle/labview/page/grouping-data-with-arrays-and-clusters.html

Depending on your data format, you can probably use the Read From Spreadsheet File VI to bring your data into a 2-d array.  You could then use the index array VI to pull your column out.  You could do this in a For loop and use Autoindexing to build your 1,000 column resulting array.  I would leave everything as a String format until I'm done. 

This doesn't sound like a very difficult task.  Good luck!

 
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 2 of 3
(2,731 Views)