LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d array and excel

Hello,

 

How can copy elements from an array to specific column of excel sheet..?? for example if i'm having a numeric array and if i have to put it into 4th column(D1) of exacel sheet,how can i do it..??Any idea..? already i'm copying 2d array into specific sheet of excel,but now i have 3 arrays(numeric,string,string). I want to put 1st numeric in column1,2nd string array in column2 and 3rd string array in column3. 

 

Or please tel how can i put these 3 arrays in a 2d array in 3 different columns. Since 1 is numeric and other 2 are string i'm not able to do that.

 

 

Thanks in advance

Sushmith.

Thanking you,
Sushmith
0 Kudos
Message 1 of 4
(2,553 Views)

Does the data in your 2-D array have to go into all the same column if so you need to define how you data splits and and convert it to a 1-D array first.  Then you can use the vi from this post to transfer to excel.  Note the data type is variant so it should differenciate between numeric and string.

0 Kudos
Message 2 of 4
(2,541 Views)

Sorry - the vi in the link needs work as it expects 2D array of strings.  Need to make it polymorphic to accept numerics too. I will work on this and post later

 

Ken 

0 Kudos
Message 3 of 4
(2,535 Views)

Not what I originally intended to do but does this do what you want.  Its a bit 'quick and dirty' but demonstrates the concept.  The repeated parts of the diagram could possibly be turned into as sub VI.

 

Instructions - Unzip the VIs to a folder and run Untitled.vi.  The other VIs are from my library of 'useful' Excel VIs

 

You need to have the path constant point to your excel file

 

Good Luck

 

Ken

0 Kudos
Message 4 of 4
(2,526 Views)