LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read excel data into an array?

Dear all:

         I want to use the excel data to build an array (2D)and then operate it in labview 7.1, but I can just do my vi in the stage, can any one help me to read the excel data and build an array first.Here is my vi and the excel file.Thanks for you help.

 

 
Download All
0 Kudos
Message 1 of 10
(4,657 Views)

And another at http://forums.ni.com/ni/board/message?board.id=170&message.id=121058&query.id=58804#M121058.

Doing a search for Read Excel brings up a ton of posts and many come with examples. The one by CC in the above post can be eaily modified to get the used range as you are in your example. One of your problems is that you are converting the cell value to an ActiveX reference instead of a string or number.

0 Kudos
Message 3 of 10
(4,642 Views)
I am so sorry that I did say clear what I want to do! I want to read the rows one by one!From 1 to n, so I need a control button to conctrol my array!I want to read my data automatically through my numercial control bottom!
Not only just read specify Rows and Columns,you can see a for loop from my vi! it is because I want to find out the corresponding elelments
in steps by steps and then use them to calculate, i want to use the second element is the first one plus second, just like y2=y1+y2!
I just want to find out the simplest way what I want to get (read excel data into an array),this is the first step!
Thanks for you help! I had seen one thousand of examples about (read excel), but none of them is my expect one!
0 Kudos
Message 4 of 10
(4,636 Views)
I did a quick mod to CC's example to read in the entire spreadsheet and to read it in row by row. I don't use Excel much so there may be (probably is) better ways to do this.
Message 5 of 10
(4,629 Views)
Thank you for your help!I will try to use it in my vi!
0 Kudos
Message 6 of 10
(4,615 Views)
If you have a look here you will find a collection of VI's to work with excel.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 7 of 10
(4,604 Views)
just want to let know that i used the vi called  Excel Get Data Row by Row (contained into the Excel Get Data Specified Field llb) and works very well by now.  thanks to the bro who did this!!!
0 Kudos
Message 8 of 10
(4,511 Views)

Is there a way to read excel data without select the range ? Where excel file takes the place it needs ?

Thanks

0 Kudos
Message 9 of 10
(4,273 Views)
You almost always have to specify a range.  The only time I can think of when you don't is when you just read the active cell.
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 10 of 10
(4,249 Views)