LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read specific cell in excel file

Hi,
I want to read a specific cell of a excel sheet in my vi. How can i do this.
Thanks
 
0 Kudos
Message 1 of 4
(3,882 Views)
General answer: you need to use ActiveX. More specifically, you need to get to a Range object and simply get the value through a property node. If you look in the examples (Help->Find Examples...) there is a "Write Table to XL" that shows you how to use ActiveX. You can take the "Set Cell Value" and change the property node that writes a value to a cell to a "Read" and that will get you the value of a cell. You may also want to head over to the unofficial Excel Board.
Message 2 of 4
(3,861 Views)

Thanks a lot.

I find this is little difficult to do. Is there any example vi that i can refer for this.

Thank you

0 Kudos
Message 3 of 4
(3,845 Views)
I just told you in my response what example to look at to give you the basics of Excel's ActiveX interface. To explicitly find it:
  1. Open the Example Finder (Help->Find Examples)
  2. Change to the "Search" tab.
  3. In the search textbox enter "Excel".
  4. You'll get one hit. Double-Click on the "Excel" entry in the listbox right below the search textbox, and the right-pane will display all Excel examples.
  5. Double-click the "Write Table to XL" example.
There are also several examples of using ActiveX with Excel in the Excel board that I indicated before.

You can also take a look at this example. The error handler subVIs called out in that example is missing, but you can just replace it with the standard error handler that comes with LabVIEW.

Message 4 of 4
(3,827 Views)